diff options
author | Eric Jackson <ericj@cvs.openbsd.org> | 2002-01-04 20:42:19 +0000 |
---|---|---|
committer | Eric Jackson <ericj@cvs.openbsd.org> | 2002-01-04 20:42:19 +0000 |
commit | e0e24bc6b228ffe7f4abada0763b9eb082786681 (patch) | |
tree | f2ccb1c907886907edba77fb3b7335914380f31c /sys | |
parent | 78d368fb2f7077a133807e48e408391e5b74f5c2 (diff) |
add 600x read for 744 rev < 2 - from netbsd
cleanup dmesg output
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/yds.c | 15 | ||||
-rw-r--r-- | sys/dev/pci/ydsvar.h | 3 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index e41548c4101..48aca2e7c4e 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yds.c,v 1.10 2001/12/20 04:50:06 jcs Exp $ */ +/* $OpenBSD: yds.c,v 1.11 2002/01/04 20:42:18 ericj Exp $ */ /* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */ /* @@ -667,11 +667,8 @@ yds_attach(parent, self, aux) char devinfo[256]; mixer_ctrl_t ctl; int i, r; - int revision; pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo); - revision = PCI_REVISION(pa->pa_class); - printf(": %s (rev. 0x%02x)\n", devinfo, revision); /* Map register to memory */ if (pci_mapreg_map(pa, YDS_PCI_MBA, PCI_MAPREG_TYPE_MEM, 0, @@ -702,6 +699,7 @@ yds_attach(parent, self, aux) sc->sc_pc = pc; sc->sc_pcitag = pa->pa_tag; sc->sc_id = pa->pa_id; + sc->sc_revision = PCI_REVISION(pa->pa_class); sc->sc_flags = yds_get_dstype(sc->sc_id); #ifdef AUDIO_DEBUG if (ydsdebug) @@ -847,6 +845,13 @@ yds_read_codec(sc_, reg, data) return EIO; } + if (PCI_PRODUCT(sc->sc->sc_id) == PCI_PRODUCT_YAMAHA_YMF744 && + sc->sc->sc_revision < 2) { + int i; + + for (i = 0; i < 600; i++) + YREAD2(sc->sc, sc->status_data); + } *data = YREAD2(sc->sc, sc->status_data); return 0; @@ -908,7 +913,7 @@ yds_intr(p) status = YREAD4(sc, YDS_STATUS); DPRINTFN(1, ("yds_intr: status=%08x\n", status)); if ((status & (YDS_STAT_INT|YDS_STAT_TINT)) == 0) { -#if NMPU > 0 +#if 0 if (sc->sc_mpu) return mpu_intr(sc->sc_mpu); #endif diff --git a/sys/dev/pci/ydsvar.h b/sys/dev/pci/ydsvar.h index d75cb6939ba..e02a7730835 100644 --- a/sys/dev/pci/ydsvar.h +++ b/sys/dev/pci/ydsvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ydsvar.h,v 1.3 2001/12/20 04:50:06 jcs Exp $ */ +/* $OpenBSD: ydsvar.h,v 1.4 2002/01/04 20:42:18 ericj Exp $ */ /* $NetBSD$ */ /* @@ -60,6 +60,7 @@ struct yds_softc { pci_chipset_tag_t sc_pc; pcitag_t sc_pcitag; pcireg_t sc_id; + int sc_revision; void *sc_ih; /* interrupt vectoring */ bus_space_tag_t memt; bus_space_handle_t memh; |