summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>1999-12-09 01:26:27 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>1999-12-09 01:26:27 +0000
commitebfa796835c2e0d280b3c63a57b35bafcc377728 (patch)
tree9e058458fb931b4748ac5d88025f13f60e1f392c /sys
parentcd3e3376be3984e119d6bab966bfec8aa8e29d82 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/conf/GENERIC982
-rw-r--r--sys/pc98/pc98/if_ed.c71
-rw-r--r--sys/pc98/pc98/if_ed98.h20
3 files changed, 84 insertions, 9 deletions
diff --git a/sys/pc98/conf/GENERIC98 b/sys/pc98/conf/GENERIC98
index 8ec8c739074d..9aac82a911c1 100644
--- a/sys/pc98/conf/GENERIC98
+++ b/sys/pc98/conf/GENERIC98
@@ -257,7 +257,7 @@ device ed7 at isa? port 0x00d0 net irq 6 flags 0x900000
device ed6 at isa? port 0x0770 net irq 6 flags 0x800000
device ed9 at isa? port 0x03d0 net irq 6 flags 0xb00000
device ed8 at isa? port 0xa3d0 net irq 6 iomem 0xd0000 iosiz 16384 flags 0xa00000
-device ed10 at isa? port 0x00d0 net irq 3 flags 0xd00000
+device ed10 at isa? port 0x00d0 net irq 3 flags 0xd10000
device ep0 at isa? port 0x40d0 net irq 3
device fe0 at isa? port 0x00d0 net irq 3
device fe1 at isa? port 0x73d0 net irq 5
diff --git a/sys/pc98/pc98/if_ed.c b/sys/pc98/pc98/if_ed.c
index 7b154316fe1e..47874bc2231b 100644
--- a/sys/pc98/pc98/if_ed.c
+++ b/sys/pc98/pc98/if_ed.c
@@ -201,6 +201,7 @@ static int ed_probe_Novell_generic __P((struct ed_softc *, int, int, int));
static int ed_probe_SIC98 __P((struct isa_device *));
static int ed_probe_CNET98 __P((struct isa_device *));
static int ed_probe_CNET98EL __P((struct isa_device *));
+static int ed_probe_NEC77 __P((struct isa_device *));
static int ed_probe_NW98X __P((struct isa_device *));
#endif
static int ed_probe_HP_pclanp __P((struct isa_device *));
@@ -515,11 +516,12 @@ ed_probe(isa_dev)
/*
* IO-DATA LA/T-98
+ * NEC PC-9801-77
*/
if (ED_TYPE98(isa_dev->id_flags) == ED_TYPE98_LA98) {
/* LA-98 */
nports98 = pc98_set_register(isa_dev, ED_TYPE98_LA98);
- nports = ed_probe_Novell(isa_dev);
+ nports = ed_probe_NEC77(isa_dev);
if (nports)
return (EDNPORTS);
}
@@ -2344,8 +2346,10 @@ static int ed_probe_CNET98EL(struct isa_device* isa_dev)
break;
#endif
default:
-printf("ed%d: Invalid irq configuration (%d) must be 3,5,6 for CNET98E/L\n",
- isa_dev->id_unit, ffs(isa_dev->id_irq) - 1);
+ printf("ed%d: Invalid irq configuration (%d) must be "
+ "%s for %s\n",
+ isa_dev->id_unit, ffs(isa_dev->id_irq) - 1,
+ "3,5,6", "CNET98E/L");
return (0);
}
outb(sc->asic_addr + ED_CNET98EL_IMR, 0x7e);
@@ -2390,6 +2394,56 @@ printf("ed%d: Invalid irq configuration (%d) must be 3,5,6 for CNET98E/L\n",
}
/*
+ * Probe and vendor-specific initialization routine for PC-9801-77 boards
+ */
+static int
+ed_probe_NEC77(isa_dev)
+ struct isa_device *isa_dev;
+{
+ struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
+ int nports;
+ u_char tmp;
+
+ nports = ed_probe_Novell(isa_dev);
+ if (nports == 0)
+ return (0);
+
+ /* LA/T-98 does not need IRQ setting. */
+ if (ED_TYPE98SUB(isa_dev->id_flags) == 0)
+ return (1);
+
+ /*
+ * Set IRQ. PC-9801-77 only allows a choice of irq 3,5,6,12,13.
+ */
+ switch (isa_dev->id_irq) {
+ case IRQ3:
+ tmp = ED_NEC77_IRQ3;
+ break;
+ case IRQ5:
+ tmp = ED_NEC77_IRQ5;
+ break;
+ case IRQ6:
+ tmp = ED_NEC77_IRQ6;
+ break;
+ case IRQ12:
+ tmp = ED_NEC77_IRQ12;
+ break;
+ case IRQ13:
+ tmp = ED_NEC77_IRQ13;
+ break;
+ default:
+ printf("ed%d: Invalid irq configuration (%d) must be "
+ "%s for %s\n",
+ isa_dev->id_unit, ffs(isa_dev->id_irq) - 1,
+ "3,5,6,12,13", "PC-9801-77");
+ return (0);
+ }
+ outb(sc->asic_addr + ED_NEC77_IRQ, tmp);
+
+ return (1);
+}
+
+/*
* Probe and vendor-specific initialization routine for EC/EP-98X boards
*/
static int
@@ -2404,6 +2458,10 @@ ed_probe_NW98X(isa_dev)
if (nports == 0)
return (0);
+ /* Networld 98X3 does not need IRQ setting. */
+ if (ED_TYPE98SUB(isa_dev->id_flags) == 0)
+ return (1);
+
/*
* Set IRQ. EC/EP-98X only allows a choice of irq 3,5,6,12,13.
*/
@@ -2425,13 +2483,14 @@ ed_probe_NW98X(isa_dev)
break;
default:
printf("ed%d: Invalid irq configuration (%d) must be "
- "3,5,6,12,13 for EC/EP-98X\n",
- isa_dev->id_unit, ffs(isa_dev->id_irq) - 1);
+ "%s for %s\n",
+ isa_dev->id_unit, ffs(isa_dev->id_irq) - 1,
+ "3,5,6,12,13", "EC/EP-98X");
return (0);
}
outb(sc->asic_addr + ED_NW98X_IRQ, tmp);
- return (nports);
+ return (1);
}
#endif
diff --git a/sys/pc98/pc98/if_ed98.h b/sys/pc98/pc98/if_ed98.h
index 4a0498b83a2e..d0ed814dfb4f 100644
--- a/sys/pc98/pc98/if_ed98.h
+++ b/sys/pc98/pc98/if_ed98.h
@@ -80,9 +80,10 @@ static int pc98_set_register_unit __P((struct ed_softc *sc, int type, int iobase
* D-Link DE-298P{T,CAT}, DE-298{T,TP,CAT}.
* 0x60 Allied Telesis SIC-98.
* 0x80 NEC PC-9801-108.
- * 0x90 IO-DATA LA-98.
+ * 0x90 IO-DATA LA-98 / NEC PC-9801-77.
* 0xa0 Contec C-NET(98).
* 0xb0 Contec C-NET(98)E/L.
+ * 0xd0 Networld EC/EP-98X.
*/
#define ED_TYPE98_BASE 0x80
@@ -343,7 +344,7 @@ static int pc98_set_register_unit __P((struct ed_softc *sc, int type, int iobase
* Networld EC/EP-98X
*/
/*
- * Interrupt Status Register (offset from ASIC base).
+ * Interrupt Configuration Register (offset from ASIC base).
*/
#define ED_NW98X_IRQ 0x1000
@@ -353,6 +354,20 @@ static int pc98_set_register_unit __P((struct ed_softc *sc, int type, int iobase
#define ED_NW98X_IRQ12 0x0a
#define ED_NW98X_IRQ13 0x02
+/*
+ * NEC PC-9801-77/78
+ */
+/*
+ * Interrupt Status Register (offset from ASIC base).
+ */
+#define ED_NEC77_IRQ 0x0100
+
+#define ED_NEC77_IRQ3 0x04
+#define ED_NEC77_IRQ5 0x06
+#define ED_NEC77_IRQ6 0x08
+#define ED_NEC77_IRQ12 0x0a
+#define ED_NEC77_IRQ13 0x02
+
/* NE2000, LGY-98, ICM, LPC-T, C-NET(98)E/L */
static unsigned int edp_generic[16] = {
@@ -413,6 +428,7 @@ pc98_set_register_unit(struct ed_softc *sc, int type, int iobase)
ED_PC_RESET = 0x1f; /* same above */
switch (type) {
+ default:
case ED_TYPE98_GENERIC:
sc->edreg.port = edp_generic;
ED_NOVELL_NIC_OFFSET = 0x0000;