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