1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | Configuration Table Use |
---|
6 | ======================= |
---|
7 | |
---|
8 | sDeviceName |
---|
9 | |
---|
10 | The name of this device. |
---|
11 | |
---|
12 | deviceType |
---|
13 | |
---|
14 | This field must be SERIAL_MG5UART. |
---|
15 | |
---|
16 | pDeviceFns |
---|
17 | |
---|
18 | The device interface control table. This may be: |
---|
19 | + mg5uart_fns for interrupt driven IO |
---|
20 | + mg5uart_fns_polled for polled IO |
---|
21 | |
---|
22 | deviceProbe |
---|
23 | |
---|
24 | This is the address of the routine which probes to see if the device |
---|
25 | is present. |
---|
26 | |
---|
27 | pDeviceFlow |
---|
28 | |
---|
29 | This field is ignored as hardware flow control is not currently supported. |
---|
30 | |
---|
31 | ulMargin |
---|
32 | |
---|
33 | This is currently unused. |
---|
34 | |
---|
35 | ulHysteresis |
---|
36 | |
---|
37 | This is currently unused. |
---|
38 | |
---|
39 | pDeviceParams |
---|
40 | |
---|
41 | This is set to the default settings. |
---|
42 | |
---|
43 | ulCtrlPort1 |
---|
44 | |
---|
45 | This field is the address of the command register shared by both ports. |
---|
46 | |
---|
47 | ulCtrlPort2 |
---|
48 | |
---|
49 | This field is the address of the port being used. |
---|
50 | |
---|
51 | ulDataPort |
---|
52 | |
---|
53 | This field is set to MG5UART_PORTA or MG5UART_PORTB. |
---|
54 | |
---|
55 | getRegister |
---|
56 | setRegister |
---|
57 | |
---|
58 | These do NOT follow standard conventions and are ignored. |
---|
59 | The register address routines are hard-coded as this is |
---|
60 | an on-CPU part and assumed to provide a 32-bit wide interface. |
---|
61 | |
---|
62 | getData |
---|
63 | |
---|
64 | This is address of the RX buffer register. |
---|
65 | |
---|
66 | setData |
---|
67 | |
---|
68 | This is address of the TX buffer register. |
---|
69 | |
---|
70 | ulClock |
---|
71 | |
---|
72 | baudRate Clock |
---|
73 | |
---|
74 | ulIntVector |
---|
75 | |
---|
76 | This is the interrupt vector number associated with this chip. |
---|
77 | |
---|
78 | Example: |
---|
79 | |
---|
80 | #if (CONSOLE_USE_INTERRUPTS) |
---|
81 | #define MG5UART_FUNCTIONS &mg5uart_fns |
---|
82 | #else |
---|
83 | #define MG5UART_FUNCTIONS &mg5uart_fns_polled |
---|
84 | #endif |
---|
85 | |
---|
86 | { |
---|
87 | "/dev/com0", /* sDeviceName */ |
---|
88 | SERIAL_MG5UART, /* deviceType */ |
---|
89 | MG5UART_FUNCTIONS, /* pDeviceFns */ |
---|
90 | NULL, /* deviceProbe, assume it is there */ |
---|
91 | NULL, /* pDeviceFlow */ |
---|
92 | 16, /* ulMargin */ |
---|
93 | 8, /* ulHysteresis */ |
---|
94 | (void *) NULL, /* NULL */ /* pDeviceParams */ |
---|
95 | MONGOOSEV_PERIPHERAL_COMMAND_REGISTER, /* ulCtrlPort1 */ |
---|
96 | MONGOOSEV_UART0_BASE, /* ulCtrlPort2 */ |
---|
97 | MG5UART_UART0, /* ulDataPort */ |
---|
98 | mg5uart_get_register, /* getRegister */ |
---|
99 | mg5uart_set_register, /* setRegister */ |
---|
100 | NULL, /* unused */ /* getData */ |
---|
101 | NULL, /* unused */ /* setData */ |
---|
102 | 12000000, /* ulClock */ |
---|
103 | MONGOOSEV_IRQ_UART0_RX_FRAME_ERROR /* ulIntVector -- base for port */ |
---|
104 | } |
---|
105 | |
---|