summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2002-09-29 13:31:26 +0000
committernyan <nyan@FreeBSD.org>2002-09-29 13:31:26 +0000
commit7ce1df07a88c69597f49afb85fe366f4800efdf8 (patch)
treed78b0f04b947db04843ce30c2205b8a8e881a12e /sys/isa
parent8435c561b3b443cf2e01f970e7322a964489187d (diff)
downloadFreeBSD-src-7ce1df07a88c69597f49afb85fe366f4800efdf8.zip
FreeBSD-src-7ce1df07a88c69597f49afb85fe366f4800efdf8.tar.gz
Added some buggy PC-98 PnP cards support.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/pnp.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/sys/isa/pnp.c b/sys/isa/pnp.c
index 6eff917..08b614c 100644
--- a/sys/isa/pnp.c
+++ b/sys/isa/pnp.c
@@ -91,6 +91,17 @@ struct pnp_quirk pnp_quirks[] = {
{ 0 }
};
+#ifdef PC98
+/* Some NEC PnP cards have 9 bytes serial code. */
+static pnp_id necids[] = {
+ {0x4180a3b8, 0xffffffff, 0x00}, /* PC-9801CB-B04 (NEC8041) */
+ {0x5181a3b8, 0xffffffff, 0x46}, /* PC-9821CB2-B04(NEC8151) */
+ {0x5182a3b8, 0xffffffff, 0xb8}, /* PC-9801-XX (NEC8251) */
+ {0x9181a3b8, 0xffffffff, 0x00}, /* PC-9801-120 (NEC8191) */
+ {0, 0, 0}
+};
+#endif
+
#if 0
/*
* these entries are initialized using the autoconfig menu
@@ -742,6 +753,10 @@ pnp_isolation_protocol(device_t parent)
u_char *resources = 0;
int space = 0;
int error;
+#ifdef PC98
+ int n, necpnp;
+ u_char buffer[10];
+#endif
/*
* Put all cards into the Sleep state so that we can clear
@@ -783,6 +798,31 @@ pnp_isolation_protocol(device_t parent)
* logical devices on the card.
*/
pnp_write(PNP_SET_CSN, csn);
+#ifdef PC98
+ if (bootverbose)
+ printf("PnP Vendor ID = %x\n", id.vendor_id);
+ /* Check for NEC PnP (9 bytes serial). */
+ for (n = necpnp = 0; necids[n].vendor_id; n++) {
+ if (id.vendor_id == necids[n].vendor_id) {
+ necpnp = 1;
+ break;
+ }
+ }
+ if (necpnp) {
+ if (bootverbose)
+ printf("It seems to NEC-PnP card (%s).\n",
+ pnp_eisaformat(id.vendor_id));
+ /* Read dummy 9 bytes serial area. */
+ pnp_get_resource_info(buffer, 9);
+ } else {
+ if (bootverbose)
+ printf("It seems to Normal-ISA-PnP card (%s).\n",
+ pnp_eisaformat(id.vendor_id));
+ }
+ if (bootverbose)
+ printf("Reading PnP configuration for %s.\n",
+ pnp_eisaformat(id.vendor_id));
+#endif
error = pnp_read_resources(&resources,
&space,
&len);
OpenPOWER on IntegriCloud