* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / asm-i386 / serial.h
blob33cd30fc9a6d5e74b43c8a7e34a020691b4fa1da
1 /*
2 * include/asm-i386/serial.h
3 */
5 #include <linux/config.h>
7 /*
8 * This assumes you have a 1.8432 MHz clock for your UART.
10 * It'd be nice if someone built a serial card with a 24.576 MHz
11 * clock, since the 16550A is capable of handling a top speed of 1.5
12 * megabits/second; but this requires the faster clock.
14 #define BASE_BAUD ( 1843200 / 16 )
16 /* Standard COM flags (except for COM4, because of the 8514 problem) */
17 #ifdef CONFIG_SERIAL_DETECT_IRQ
18 #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
19 #define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
20 #else
21 #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
22 #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
23 #endif
25 #ifdef CONFIG_SERIAL_MANY_PORTS
26 #define FOURPORT_FLAGS ASYNC_FOURPORT
27 #define ACCENT_FLAGS 0
28 #define BOCA_FLAGS 0
29 #define HUB6_FLAGS 0
30 #define RS_TABLE_SIZE 64
31 #else
32 #define RS_TABLE_SIZE
33 #endif
36 * The following define the access methods for the HUB6 card. All
37 * access is through two ports for all 24 possible chips. The card is
38 * selected through the high 2 bits, the port on that card with the
39 * "middle" 3 bits, and the register on that port with the bottom
40 * 3 bits.
42 * While the access port and interrupt is configurable, the default
43 * port locations are 0x302 for the port control register, and 0x303
44 * for the data read/write register. Normally, the interrupt is at irq3
45 * but can be anything from 3 to 7 inclusive. Note that using 3 will
46 * require disabling com2.
49 #define C_P(card,port) (((card)<<6|(port)<<3) + 1)
51 #define STD_SERIAL_PORT_DEFNS \
52 /* UART CLK PORT IRQ FLAGS */ \
53 { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
54 { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
55 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
56 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
59 #ifdef CONFIG_SERIAL_MANY_PORTS
60 #define EXTRA_SERIAL_PORT_DEFNS \
61 { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \
62 { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \
63 { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \
64 { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \
65 { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \
66 { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \
67 { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \
68 { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \
69 { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \
70 { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \
71 { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \
72 { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \
73 { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \
74 { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \
75 { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \
76 { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \
77 { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \
78 { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \
79 { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \
80 { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \
81 { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \
82 { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \
83 { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \
84 { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \
85 { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \
86 { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \
87 { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \
88 { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */
89 #else
90 #define EXTRA_SERIAL_PORT_DEFNS
91 #endif
93 /* You can have up to four HUB6's in the system, but I've only
94 * included two cards here for a total of twelve ports.
96 #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS))
97 #define HUB6_SERIAL_PORT_DFNS \
98 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \
99 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \
100 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \
101 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \
102 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \
103 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \
104 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \
105 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \
106 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \
107 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \
108 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \
109 { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */
110 #else
111 #define HUB6_SERIAL_PORT_DFNS
112 #endif
114 #ifdef CONFIG_MCA
115 #define MCA_SERIAL_PORT_DFNS \
116 { 0, BASE_BAUD, 0x3220, 3, STD_COM_FLAGS }, \
117 { 0, BASE_BAUD, 0x3228, 3, STD_COM_FLAGS }, \
118 { 0, BASE_BAUD, 0x4220, 3, STD_COM_FLAGS }, \
119 { 0, BASE_BAUD, 0x4228, 3, STD_COM_FLAGS }, \
120 { 0, BASE_BAUD, 0x5220, 3, STD_COM_FLAGS }, \
121 { 0, BASE_BAUD, 0x5228, 3, STD_COM_FLAGS },
122 #else
123 #define MCA_SERIAL_PORT_DFNS
124 #endif
126 #define SERIAL_PORT_DFNS \
127 STD_SERIAL_PORT_DEFNS \
128 EXTRA_SERIAL_PORT_DEFNS \
129 HUB6_SERIAL_PORT_DFNS \
130 MCA_SERIAL_PORT_DFNS