Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci make this work on PowerMac G5
details: https://anonhg.NetBSD.org/src/rev/09799436479d
branches: trunk
changeset: 786410:09799436479d
user: macallan <macallan%NetBSD.org@localhost>
date: Sun Apr 28 00:47:56 2013 +0000
description:
make this work on PowerMac G5
from Phileas Fogg
diffstat:
sys/dev/pci/svwsata.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 20def7200053 -r 09799436479d sys/dev/pci/svwsata.c
--- a/sys/dev/pci/svwsata.c Sun Apr 28 00:47:20 2013 +0000
+++ b/sys/dev/pci/svwsata.c Sun Apr 28 00:47:56 2013 +0000
@@ -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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index