From 97c6f4f9763a5cee0e4eb044f0a8a4f7ac55f8f2 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 27 Sep 2002 22:00:23 +0000 Subject: [PATCH] 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. --- sys/dev/sio/sio.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index df62c90c3cb..8659a3b59a6 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;