OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-ppc64/] [serial.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * include/asm-ppc/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
 * This program is free software; you can redistribute it and/or
15
 * modify it under the terms of the GNU General Public License
16
 * as published by the Free Software Foundation; either version
17
 * 2 of the License, or (at your option) any later version.
18
 */
19
#define BASE_BAUD ( 1843200 / 16 )
20
 
21
#ifdef CONFIG_SERIAL_MANY_PORTS
22
#define RS_TABLE_SIZE  64
23
#else
24
#define RS_TABLE_SIZE  4
25
#endif
26
 
27
/* Standard COM flags (except for COM4, because of the 8514 problem) */
28
#ifdef CONFIG_SERIAL_DETECT_IRQ
29
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
30
#else
31
#define STD_COM_FLAGS ASYNC_BOOT_AUTOCONF
32
#endif
33
 
34
#ifdef CONFIG_SERIAL_MANY_PORTS
35
#define FOURPORT_FLAGS ASYNC_FOURPORT
36
#define ACCENT_FLAGS 0
37
#define BOCA_FLAGS 0
38
#define HUB6_FLAGS 0
39
#endif
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, 0x898, 0xe, STD_COM_FLAGS },     /* ttyS2 */     \
62
        { 0, BASE_BAUD, 0x890, 0xf, STD_COM_FLAGS },     /* ttyS3 */
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
#define MCA_SERIAL_PORT_DFNS
121
 
122
#define SERIAL_PORT_DFNS                \
123
        STD_SERIAL_PORT_DEFNS           \
124
        EXTRA_SERIAL_PORT_DEFNS         \
125
        HUB6_SERIAL_PORT_DFNS           \
126
        MCA_SERIAL_PORT_DFNS

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.