[e7ff2b2] | 1 | /* |
---|
| 2 | * This file contains the TTY driver table for the DY-4 DMV177. |
---|
| 3 | * |
---|
| 4 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997. |
---|
| 5 | * On-Line Applications Research Corporation (OAR). |
---|
| 6 | * All rights assigned to U.S. Government, 1994. |
---|
| 7 | * |
---|
| 8 | * $Id$ |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #include <bsp.h> |
---|
| 12 | |
---|
| 13 | #include <libchip/serial.h> |
---|
| 14 | #include <libchip/mc68681.h> |
---|
| 15 | #include <libchip/z85c30.h> |
---|
| 16 | #include "mc68681cfg.h" |
---|
| 17 | #include "z85c30cfg.h" |
---|
| 18 | |
---|
| 19 | /* |
---|
| 20 | * Configuration specific probe routines |
---|
| 21 | * |
---|
| 22 | * |
---|
| 23 | * NOTE: There are no DMV177 specific configuration routines. These |
---|
| 24 | * routines could be written to dynamically determine which serial |
---|
| 25 | * ports are on a board. Debugging this would require access to |
---|
| 26 | * multiple board models. |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | /* NONE CURRENTLY PROVIDED */ |
---|
| 30 | |
---|
| 31 | /* |
---|
| 32 | * The following table configures the console drivers used in this BSP. |
---|
| 33 | * |
---|
| 34 | * The first entry which, when probed, is available, will be named /dev/console, |
---|
| 35 | * all others being given the name indicated. |
---|
| 36 | */ |
---|
| 37 | |
---|
| 38 | console_tbl Console_Port_Tbl[] = { |
---|
| 39 | { |
---|
| 40 | "/dev/com0", /* sDeviceName */ |
---|
| 41 | &mc68681_fns, /* pDeviceFns */ |
---|
| 42 | NULL, /* deviceProbe */ |
---|
| 43 | NULL, /* pDeviceFlow */ |
---|
| 44 | 16, /* ulMargin */ |
---|
| 45 | 8, /* ulHysteresis */ |
---|
| 46 | (void *)9600, /* baud rate */ /* pDeviceParams */ |
---|
| 47 | MC68681_ADDR, /* ulCtrlPort1 */ |
---|
| 48 | MC68681_PORT1_ADDR, /* ulCtrlPort2 */ |
---|
| 49 | 0, /* ulDataPort */ |
---|
| 50 | Read_mc68681_register, /* getRegister */ |
---|
| 51 | Write_mc68681_register, /* setRegister */ |
---|
| 52 | NULL, /* unused */ /* getData */ |
---|
| 53 | NULL, /* unused */ /* setData */ |
---|
| 54 | 0, /* unused */ /* ulClock */ |
---|
| 55 | DMV170_DUART_IRQ /* ulIntVector */ |
---|
| 56 | }, |
---|
| 57 | { |
---|
| 58 | "/dev/com1", /* sDeviceName */ |
---|
| 59 | &mc68681_fns, /* pDeviceFns */ |
---|
| 60 | NULL, /* deviceProbe */ |
---|
| 61 | NULL, /* pDeviceFlow */ |
---|
| 62 | 16, /* ulMargin */ |
---|
| 63 | 8, /* ulHysteresis */ |
---|
| 64 | (void *)9600, /* baud rate */ /* pDeviceParams */ |
---|
| 65 | MC68681_ADDR, /* ulCtrlPort1 */ |
---|
| 66 | MC68681_PORT2_ADDR, /* ulCtrlPort2 */ |
---|
| 67 | 0, /* ulDataPort */ |
---|
| 68 | Read_mc68681_register, /* getRegister */ |
---|
| 69 | Write_mc68681_register, /* setRegister */ |
---|
| 70 | NULL, /* unused */ /* getData */ |
---|
| 71 | NULL, /* unused */ /* setData */ |
---|
| 72 | 0, /* unused */ /* ulClock */ |
---|
| 73 | DMV170_DUART_IRQ /* ulIntVector */ |
---|
| 74 | }, |
---|
| 75 | { |
---|
| 76 | "/dev/com3", /* sDeviceName */ |
---|
| 77 | &z85c30_fns, /* pDeviceFns */ |
---|
| 78 | NULL, /* deviceProbe */ |
---|
| 79 | NULL, /* pDeviceFlow */ |
---|
| 80 | 16, /* ulMargin */ |
---|
| 81 | 8, /* ulHysteresis */ |
---|
| 82 | (void *)9600, /* baud rate */ /* pDeviceParams */ |
---|
| 83 | Z85C30_CTRL_A, /* ulCtrlPort1 */ |
---|
| 84 | Z85C30_CTRL_A, /* ulCtrlPort2 */ |
---|
| 85 | Z85C30_DATA_A, /* ulDataPort */ |
---|
| 86 | Read_z85c30_register, /* getRegister */ |
---|
| 87 | Write_z85c30_register, /* setRegister */ |
---|
| 88 | Read_z85c30_data, /* getData */ |
---|
| 89 | Write_z85c30_data, /* setData */ |
---|
| 90 | Z85C30_CLOCK, /* ulClock */ |
---|
| 91 | DMV170_SCC_IRQ /* ulIntVector */ |
---|
| 92 | }, |
---|
| 93 | { |
---|
| 94 | "/dev/com4", /* sDeviceName */ |
---|
| 95 | &z85c30_fns, /* pDeviceFns */ |
---|
| 96 | NULL, /* deviceProbe */ |
---|
| 97 | NULL, /* pDeviceFlow */ |
---|
| 98 | 16, /* ulMargin */ |
---|
| 99 | 8, /* ulHysteresis */ |
---|
| 100 | (void *)9600, /* baud rate */ /* pDeviceParams */ |
---|
| 101 | Z85C30_CTRL_B, /* ulCtrlPort1 */ |
---|
| 102 | Z85C30_CTRL_A, /* ulCtrlPort2 */ |
---|
| 103 | Z85C30_DATA_B, /* ulDataPort */ |
---|
| 104 | Read_z85c30_register, /* getRegister */ |
---|
| 105 | Write_z85c30_register, /* setRegister */ |
---|
| 106 | Read_z85c30_data, /* getData */ |
---|
| 107 | Write_z85c30_data, /* setData */ |
---|
| 108 | Z85C30_CLOCK, /* ulClock */ |
---|
| 109 | DMV170_SCC_IRQ /* ulIntVector */ |
---|
| 110 | } |
---|
| 111 | }; |
---|
| 112 | |
---|
| 113 | /* |
---|
| 114 | * Declare some information used by the console driver |
---|
| 115 | */ |
---|
| 116 | |
---|
| 117 | #define NUM_CONSOLE_PORTS (sizeof(Console_Port_Tbl)/sizeof(console_tbl)) |
---|
| 118 | |
---|
| 119 | unsigned long Console_Port_Count = NUM_CONSOLE_PORTS; |
---|
| 120 | |
---|
| 121 | console_data Console_Port_Data[NUM_CONSOLE_PORTS]; |
---|
| 122 | |
---|
| 123 | rtems_device_minor_number Console_Port_Minor; |
---|