diff options
author | phk <phk@FreeBSD.org> | 2002-09-27 22:00:23 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-27 22:00:23 +0000 |
commit | d2d1a6d2ea1885ab0fd7b708da8129b8b14ce52e (patch) | |
tree | fbdad0fdf8cb86cdbb3a693cec4c485333ae4c9e /sys/dev | |
parent | ead9e9f4b3c15e2dbecee0f9fd702f44dda71329 (diff) | |
download | FreeBSD-src-d2d1a6d2ea1885ab0fd7b708da8129b8b14ce52e.zip FreeBSD-src-d2d1a6d2ea1885ab0fd7b708da8129b8b14ce52e.tar.gz |
Add yet a quick flag to sio: 0x100000 "Scratch pad register missing".
The advanced stage of computer assisted hardware design and
verification is aptly illustrated by the fact that this is necessary
because only the first ports in a single-chip, dual-port async
PC-Card product lacks this register.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sio/sio.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index df62c90..8659a3b 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -104,6 +104,8 @@ #define COM_ISMULTIPORT(flags) ((flags) & 0x01) #define COM_MPMASTER(flags) (((flags) >> 8) & 0x0ff) #define COM_NOTAST4(flags) ((flags) & 0x04) +#else +#define COM_ISMULTIPORT(flags) (0) #endif /* COM_MULTIPORT */ #define COM_CONSOLE(flags) ((flags) & 0x10) @@ -117,6 +119,7 @@ #define COM_NOPROBE(flags) ((flags) & COM_C_NOPROBE) #define COM_C_IIR_TXRDYBUG (0x80000) #define COM_IIR_TXRDYBUG(flags) ((flags) & COM_C_IIR_TXRDYBUG) +#define COM_NOSCR(flags) ((flags) & 0x100000) #define COM_FIFOSIZE(flags) (((flags) & 0xff000000) >> 24) #define sio_getreg(com, off) \ @@ -968,12 +971,8 @@ sioattach(dev, xrid, rclk) printf("sio%d: type", unit); -#ifdef COM_MULTIPORT - if (!COM_ISMULTIPORT(flags) && !COM_IIR_TXRDYBUG(flags)) -#else - if (!COM_IIR_TXRDYBUG(flags)) -#endif - { + if (!COM_ISMULTIPORT(flags) && + !COM_IIR_TXRDYBUG(flags) && !COM_NOSCR(flags)) { u_char scr; u_char scr1; u_char scr2; |