summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/isa/mss.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/isa/mss.c')
-rw-r--r--sys/dev/sound/isa/mss.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index b076833..3094b9e 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -550,7 +550,11 @@ mss_probe(device_t dev)
rman_get_start(mss->io_base), tmpx));
goto no;
}
+#ifdef PC98
+ if (irq > 12) {
+#else
if (irq > 11) {
+#endif
printf("MSS: Bad IRQ %d\n", irq);
goto no;
}
@@ -835,6 +839,10 @@ ymf_test(device_t dev, struct mss_info *mss)
if (!j) {
bus_release_resource(dev, SYS_RES_IOPORT,
mss->conf_rid, mss->conf_base);
+#ifdef PC98
+ /* PC98 need this. I don't know reason why. */
+ bus_delete_resource(dev, SYS_RES_IOPORT, mss->conf_rid);
+#endif
mss->conf_base = 0;
continue;
}
@@ -856,16 +864,23 @@ mss_doattach(device_t dev, struct mss_info *mss)
mss_init(mss, dev);
if (flags & DV_F_TRUE_MSS) {
/* has IRQ/DMA registers, set IRQ and DMA addr */
+#ifdef PC98 /* CS423[12] in PC98 can use IRQ3,5,10,12 */
+ static char interrupt_bits[13] =
+ {-1, -1, -1, 0x08, -1, 0x10, -1, -1, -1, -1, 0x18, -1, 0x20};
+#else
static char interrupt_bits[12] =
{-1, -1, -1, -1, -1, 0x28, -1, 0x08, -1, 0x10, 0x18, 0x20};
+#endif
static char pdma_bits[4] = {1, 2, -1, 3};
static char valid_rdma[4] = {1, 0, -1, 0};
char bits;
if (!mss->irq || (bits = interrupt_bits[rman_get_start(mss->irq)]) == -1)
goto no;
+#ifndef PC98 /* CS423[12] in PC98 don't support this. */
io_wr(mss, 0, bits | 0x40); /* config port */
if ((io_rd(mss, 3) & 0x40) == 0) device_printf(dev, "IRQ Conflict?\n");
+#endif
/* Write IRQ+DMA setup */
if (pdma_bits[mss->pdma] == -1) goto no;
bits |= pdma_bits[mss->pdma];
OpenPOWER on IntegriCloud