diff options
author | Mark Fortescue <mark@mtfhpc.demon.co.uk> | 2007-05-09 16:49:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-05-09 16:49:04 -0400 |
commit | 7cc5c8559c62289d027812bfdd4eb6a28c5769b6 (patch) | |
tree | d0d75ddd6cfcceba5bd5bc2a0e2438a946f04169 /drivers/serial/sunzilog.h | |
parent | ca3dd88e411648c76e1911a729440e3763ba5049 (diff) |
[SERIAL] sunzilog: Interrupt enable before ISR handler installed
This patch changes the interrupt enable sequence for the sunzilog driver
so that interrupts are not enabled untill after the interrupt handler has
been installed. If this is not done, some SS1 and SS2 sun4c systems panic
on un-handled interrupt before the handler gets installed preventing boot.
It also adds in support for the ESCC version of the zilog chips. The
changes mean that the FIFO will be enabled for ESCC versions of the
SCC UART. My interpretation of the SCC manual and the existing interrupt
handler code is that it sould be able to make good use of the FIFO without
issues.
Signed-off-by: Mark Fortescue <mark@mtfhpc.demon.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial/sunzilog.h')
-rw-r--r-- | drivers/serial/sunzilog.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/serial/sunzilog.h b/drivers/serial/sunzilog.h index 7939b6d71270..5dec7b47cc38 100644 --- a/drivers/serial/sunzilog.h +++ b/drivers/serial/sunzilog.h | |||
@@ -13,7 +13,8 @@ struct zilog_layout { | |||
13 | struct zilog_channel channelA; | 13 | struct zilog_channel channelA; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | #define NUM_ZSREGS 16 | 16 | #define NUM_ZSREGS 17 |
17 | #define R7p 16 /* Written as R7 with P15 bit 0 set */ | ||
17 | 18 | ||
18 | /* Conversion routines to/from brg time constants from/to bits | 19 | /* Conversion routines to/from brg time constants from/to bits |
19 | * per second. | 20 | * per second. |
@@ -127,6 +128,15 @@ struct zilog_layout { | |||
127 | 128 | ||
128 | /* Write Register 7 (Sync bits 8-15/SDLC 01111110) */ | 129 | /* Write Register 7 (Sync bits 8-15/SDLC 01111110) */ |
129 | 130 | ||
131 | /* Write Register 7' (ESCC Only) */ | ||
132 | #define AUTO_TxFLAG 1 /* Automatic Tx SDLC Flag */ | ||
133 | #define AUTO_EOM_RST 2 /* Automatic EOM Reset */ | ||
134 | #define AUTOnRTS 4 /* Automatic /RTS pin deactivation */ | ||
135 | #define RxFIFO_LVL 8 /* Receive FIFO interrupt level */ | ||
136 | #define nDTRnREQ 0x10 /* /DTR/REQ timing */ | ||
137 | #define TxFIFO_LVL 0x20 /* Transmit FIFO interrupt level */ | ||
138 | #define EXT_RD_EN 0x40 /* Extended read register enable */ | ||
139 | |||
130 | /* Write Register 8 (transmit buffer) */ | 140 | /* Write Register 8 (transmit buffer) */ |
131 | 141 | ||
132 | /* Write Register 9 (Master interrupt control) */ | 142 | /* Write Register 9 (Master interrupt control) */ |
@@ -135,6 +145,7 @@ struct zilog_layout { | |||
135 | #define DLC 4 /* Disable Lower Chain */ | 145 | #define DLC 4 /* Disable Lower Chain */ |
136 | #define MIE 8 /* Master Interrupt Enable */ | 146 | #define MIE 8 /* Master Interrupt Enable */ |
137 | #define STATHI 0x10 /* Status high */ | 147 | #define STATHI 0x10 /* Status high */ |
148 | #define SWIACK 0x20 /* Software Interrupt Ack (not on NMOS) */ | ||
138 | #define NORESET 0 /* No reset on write to R9 */ | 149 | #define NORESET 0 /* No reset on write to R9 */ |
139 | #define CHRB 0x40 /* Reset channel B */ | 150 | #define CHRB 0x40 /* Reset channel B */ |
140 | #define CHRA 0x80 /* Reset channel A */ | 151 | #define CHRA 0x80 /* Reset channel A */ |
@@ -187,7 +198,9 @@ struct zilog_layout { | |||
187 | #define SNRZI 0xe0 /* Set NRZI mode */ | 198 | #define SNRZI 0xe0 /* Set NRZI mode */ |
188 | 199 | ||
189 | /* Write Register 15 (external/status interrupt control) */ | 200 | /* Write Register 15 (external/status interrupt control) */ |
201 | #define WR7pEN 1 /* WR7' Enable (ESCC only) */ | ||
190 | #define ZCIE 2 /* Zero count IE */ | 202 | #define ZCIE 2 /* Zero count IE */ |
203 | #define FIFOEN 4 /* FIFO Enable (ESCC only) */ | ||
191 | #define DCDIE 8 /* DCD IE */ | 204 | #define DCDIE 8 /* DCD IE */ |
192 | #define SYNCIE 0x10 /* Sync/hunt IE */ | 205 | #define SYNCIE 0x10 /* Sync/hunt IE */ |
193 | #define CTSIE 0x20 /* CTS IE */ | 206 | #define CTSIE 0x20 /* CTS IE */ |
@@ -241,6 +254,10 @@ struct zilog_layout { | |||
241 | #define CHATxIP 0x10 /* Channel A Tx IP */ | 254 | #define CHATxIP 0x10 /* Channel A Tx IP */ |
242 | #define CHARxIP 0x20 /* Channel A Rx IP */ | 255 | #define CHARxIP 0x20 /* Channel A Rx IP */ |
243 | 256 | ||
257 | /* Read Register 6 (LSB frame byte count [Not on NMOS]) */ | ||
258 | |||
259 | /* Read Register 7 (MSB frame byte count and FIFO status [Not on NMOS]) */ | ||
260 | |||
244 | /* Read Register 8 (receive data register) */ | 261 | /* Read Register 8 (receive data register) */ |
245 | 262 | ||
246 | /* Read Register 10 (misc status bits) */ | 263 | /* Read Register 10 (misc status bits) */ |