summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormacallan <macallan@NetBSD.org>2013-04-28 00:47:56 +0000
committermacallan <macallan@NetBSD.org>2013-04-28 00:47:56 +0000
commit60d5234f68cd9d7f6751ca330f3ced78f6da85ee (patch)
tree1a7f61af0fd9622e464eaa7dcccc9589764e9ad7 /sys/dev
parent3c7f652f7996bb4c411209548eb96be2fe548452 (diff)
make this work on PowerMac G5
from Phileas Fogg
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/svwsata.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/pci/svwsata.c b/sys/dev/pci/svwsata.c
index ad89a6410fe..131cf1708ef 100644
--- a/sys/dev/pci/svwsata.c
+++ b/sys/dev/pci/svwsata.c
@@ -1,4 +1,4 @@
-/* $NetBSD: svwsata.c,v 1.16 2012/07/31 15:50:36 bouyer Exp $ */
+/* $NetBSD: svwsata.c,v 1.17 2013/04/28 00:47:56 macallan Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svwsata.c,v 1.16 2012/07/31 15:50:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svwsata.c,v 1.17 2013/04/28 00:47:56 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -110,9 +110,6 @@ svwsata_chip_map(struct pciide_softc *sc, const struct pci_attach_args *pa)
const char *intrstr;
int channel;
- if (pciide_chipen(sc, pa) == 0)
- return;
-
/* The 4-port version has a dummy second function. */
if (pci_conf_read(sc->sc_pc, sc->sc_tag,
PCI_MAPREG_START + 0x14) == 0) {
@@ -314,6 +311,16 @@ svwsata_mapchan(struct pciide_channel *cp)
goto bad;
}
+ bus_space_write_4(sc->sc_ba5_st, sc->sc_ba5_sh,
+ (wdc_cp->ch_channel << 8) + SVWSATA_SICR1,
+ bus_space_read_4(sc->sc_ba5_st, sc->sc_ba5_sh,
+ (wdc_cp->ch_channel << 8) + SVWSATA_SICR1)
+ & ~0x00040000);
+ bus_space_write_4(sc->sc_ba5_st, sc->sc_ba5_sh,
+ (wdc_cp->ch_channel << 8) + SVWSATA_SERROR, 0xffffffff);
+ bus_space_write_4(sc->sc_ba5_st, sc->sc_ba5_sh,
+ (wdc_cp->ch_channel << 8) + SVWSATA_SIM, 0);
+
wdcattach(wdc_cp);
return;