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