summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/isa/pnp.c40
-rw-r--r--sys/pc98/cbus/sio_cbus.c23
-rw-r--r--sys/pc98/pc98/sio_cbus.c23
3 files changed, 78 insertions, 8 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);
diff --git a/sys/pc98/cbus/sio_cbus.c b/sys/pc98/cbus/sio_cbus.c
index bfcfcc3..10bbdc1 100644
--- a/sys/pc98/cbus/sio_cbus.c
+++ b/sys/pc98/cbus/sio_cbus.c
@@ -61,6 +61,13 @@ static driver_t sio_isa_driver = {
static struct isa_pnp_id sio_ids[] = {
{0x0100e4a5, "RSA-98III"},
+ {0x11802fbf, NULL}, /* OYO8011 - PC-9801-12X */
+ {0x4180a3b8, NULL}, /* NEC8041 - PC-9821CB-B04 */
+ {0x4182a3b8, NULL}, /* NEC8241 - (Nw150) */
+ {0x5181a3b8, NULL}, /* NEC8151 - PC-9821CB2-B04 */
+ {0x5182a3b8, NULL}, /* NEC8251 - PC-9801-12X */
+ {0x7182a3b8, NULL}, /* NEC8271 - PC-9801-12X */
+ {0x9181a3b8, NULL}, /* NEC8191 - PC-9801-120 */
{0}
};
@@ -68,20 +75,28 @@ static int
sio_isa_probe(dev)
device_t dev;
{
-#ifdef PC98
int logical_id;
-#endif
+
/* Check isapnp ids */
if (ISA_PNP_PROBE(device_get_parent(dev), dev, sio_ids) == ENXIO)
return (ENXIO);
-#ifdef PC98
+
logical_id = isa_get_logicalid(dev);
switch (logical_id) {
case 0x0100e4a5: /* RSA-98III */
SET_FLAG(dev, SET_IFTYPE(COM_IF_RSA98III));
break;
+ case 0x11802fbf: /* PC-9801-12X */
+ case 0x4180a3b8: /* PC-9821CB-B04 */
+ case 0x4182a3b8: /* (Nw150) */
+ case 0x5181a3b8: /* PC-9821CB2-B04 */
+ case 0x5182a3b8: /* PC-9801-12X */
+ case 0x7182a3b8: /* PC-9801-12X */
+ case 0x9181a3b8: /* PC-9801-120 */
+ SET_FLAG(dev, SET_IFTYPE(COM_IF_NS16550));
+ break;
}
-#endif
+
return (sioprobe(dev, 0, 0UL, 0));
}
diff --git a/sys/pc98/pc98/sio_cbus.c b/sys/pc98/pc98/sio_cbus.c
index bfcfcc3..10bbdc1 100644
--- a/sys/pc98/pc98/sio_cbus.c
+++ b/sys/pc98/pc98/sio_cbus.c
@@ -61,6 +61,13 @@ static driver_t sio_isa_driver = {
static struct isa_pnp_id sio_ids[] = {
{0x0100e4a5, "RSA-98III"},
+ {0x11802fbf, NULL}, /* OYO8011 - PC-9801-12X */
+ {0x4180a3b8, NULL}, /* NEC8041 - PC-9821CB-B04 */
+ {0x4182a3b8, NULL}, /* NEC8241 - (Nw150) */
+ {0x5181a3b8, NULL}, /* NEC8151 - PC-9821CB2-B04 */
+ {0x5182a3b8, NULL}, /* NEC8251 - PC-9801-12X */
+ {0x7182a3b8, NULL}, /* NEC8271 - PC-9801-12X */
+ {0x9181a3b8, NULL}, /* NEC8191 - PC-9801-120 */
{0}
};
@@ -68,20 +75,28 @@ static int
sio_isa_probe(dev)
device_t dev;
{
-#ifdef PC98
int logical_id;
-#endif
+
/* Check isapnp ids */
if (ISA_PNP_PROBE(device_get_parent(dev), dev, sio_ids) == ENXIO)
return (ENXIO);
-#ifdef PC98
+
logical_id = isa_get_logicalid(dev);
switch (logical_id) {
case 0x0100e4a5: /* RSA-98III */
SET_FLAG(dev, SET_IFTYPE(COM_IF_RSA98III));
break;
+ case 0x11802fbf: /* PC-9801-12X */
+ case 0x4180a3b8: /* PC-9821CB-B04 */
+ case 0x4182a3b8: /* (Nw150) */
+ case 0x5181a3b8: /* PC-9821CB2-B04 */
+ case 0x5182a3b8: /* PC-9801-12X */
+ case 0x7182a3b8: /* PC-9801-12X */
+ case 0x9181a3b8: /* PC-9801-120 */
+ SET_FLAG(dev, SET_IFTYPE(COM_IF_NS16550));
+ break;
}
-#endif
+
return (sioprobe(dev, 0, 0UL, 0));
}
OpenPOWER on IntegriCloud