Subversion Repositories shark

Rev

Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
422 giacomo 1
/*
2
 * include/asm-i386/serial.h
3
 */
4
 
5
#include <linux/config.h>
6
 
7
/*
8
 * This assumes you have a 1.8432 MHz clock for your UART.
9
 *
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.
13
 */
14
#define BASE_BAUD ( 1843200 / 16 )
15
 
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
24
 
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
#endif
31
 
32
#define MCA_COM_FLAGS   (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA)
33
 
34
/*
35
 * The following define the access methods for the HUB6 card. All
36
 * access is through two ports for all 24 possible chips. The card is
37
 * selected through the high 2 bits, the port on that card with the
38
 * "middle" 3 bits, and the register on that port with the bottom
39
 * 3 bits.
40
 *
41
 * While the access port and interrupt is configurable, the default
42
 * port locations are 0x302 for the port control register, and 0x303
43
 * for the data read/write register. Normally, the interrupt is at irq3
44
 * but can be anything from 3 to 7 inclusive. Note that using 3 will
45
 * require disabling com2.
46
 */
47
 
48
#define C_P(card,port) (((card)<<6|(port)<<3) + 1)
49
 
50
#ifndef CONFIG_X86_PC9800
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 */
57
#else
58
#define STD_SERIAL_PORT_DEFNS                   \
59
        /* UART CLK   PORT IRQ     FLAGS        */                      \
60
        { 0, BASE_BAUD, 0x30, 4, STD_COM_FLAGS },       /* ttyS0 */     \
61
        { 0, BASE_BAUD, 0x238, 5, STD_COM_FLAGS },      /* ttyS1 */
62
#endif /* CONFIG_X86_PC9800 */
63
 
64
 
65
#ifdef CONFIG_SERIAL_MANY_PORTS
66
#define EXTRA_SERIAL_PORT_DEFNS                 \
67
        { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS },     /* ttyS4 */     \
68
        { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS },     /* ttyS5 */     \
69
        { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS },     /* ttyS6 */     \
70
        { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS },     /* ttyS7 */     \
71
        { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS },     /* ttyS8 */     \
72
        { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS },     /* ttyS9 */     \
73
        { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS },     /* ttyS10 */    \
74
        { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS },     /* ttyS11 */    \
75
        { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS },       /* ttyS12 */    \
76
        { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS },       /* ttyS13 */    \
77
        { 0, BASE_BAUD, 0x000, 0, 0 },  /* ttyS14 (spare) */            \
78
        { 0, BASE_BAUD, 0x000, 0, 0 },  /* ttyS15 (spare) */            \
79
        { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS },        /* ttyS16 */    \
80
        { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS },        /* ttyS17 */    \
81
        { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS },        /* ttyS18 */    \
82
        { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS },        /* ttyS19 */    \
83
        { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS },        /* ttyS20 */    \
84
        { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS },        /* ttyS21 */    \
85
        { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS },        /* ttyS22 */    \
86
        { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS },        /* ttyS23 */    \
87
        { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS },        /* ttyS24 */    \
88
        { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS },        /* ttyS25 */    \
89
        { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS },        /* ttyS26 */    \
90
        { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS },        /* ttyS27 */    \
91
        { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS },        /* ttyS28 */    \
92
        { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS },        /* ttyS29 */    \
93
        { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS },        /* ttyS30 */    \
94
        { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS },        /* ttyS31 */
95
#else
96
#define EXTRA_SERIAL_PORT_DEFNS
97
#endif
98
 
99
/* You can have up to four HUB6's in the system, but I've only
100
 * included two cards here for a total of twelve ports.
101
 */
102
#if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS))
103
#define HUB6_SERIAL_PORT_DFNS           \
104
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) },  /* ttyS32 */ \
105
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) },  /* ttyS33 */ \
106
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) },  /* ttyS34 */ \
107
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) },  /* ttyS35 */ \
108
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) },  /* ttyS36 */ \
109
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) },  /* ttyS37 */ \
110
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) },  /* ttyS38 */ \
111
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) },  /* ttyS39 */ \
112
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) },  /* ttyS40 */ \
113
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) },  /* ttyS41 */ \
114
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) },  /* ttyS42 */ \
115
        { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) },  /* ttyS43 */
116
#else
117
#define HUB6_SERIAL_PORT_DFNS
118
#endif
119
 
120
#ifdef CONFIG_MCA
121
#define MCA_SERIAL_PORT_DFNS                    \
122
        { 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS },     \
123
        { 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS },     \
124
        { 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS },     \
125
        { 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS },     \
126
        { 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS },     \
127
        { 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS },
128
#else
129
#define MCA_SERIAL_PORT_DFNS
130
#endif
131
 
132
#define SERIAL_PORT_DFNS                \
133
        STD_SERIAL_PORT_DEFNS           \
134
        EXTRA_SERIAL_PORT_DEFNS         \
135
        HUB6_SERIAL_PORT_DFNS           \
136
        MCA_SERIAL_PORT_DFNS
137