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