summaryrefslogtreecommitdiff
path: root/sys/dev/pci/pciide.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-08-31 12:50:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-08-31 12:50:52 +0000
commit58c1ecf3722b62fdfcd29bbd8fbf6d0820ef2ba5 (patch)
treeef937d21d1fa097111dcd045bf725a3caea57445 /sys/dev/pci/pciide.c
parente5ce488696834bec4d829627b82e70f42dbb1a25 (diff)
PCI configuration space register save/restore for AMD756.
Diffstat (limited to 'sys/dev/pci/pciide.c')
-rw-r--r--sys/dev/pci/pciide.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index ab578e300c7..4c393ea8056 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.318 2010/08/06 05:34:29 deraadt Exp $ */
+/* $OpenBSD: pciide.c,v 1.319 2010/08/31 12:50:51 miod Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -1441,6 +1441,15 @@ pciide_activate(struct device *self, int act)
sc->sc_tag, NFORCE_PIOTIM);
sc->sc_save2[2] = pci_conf_read(sc->sc_pc,
sc->sc_tag, NFORCE_UDMATIM);
+ } else if (sc->sc_pp->chip_map == amd756_chip_map) {
+ sc->sc_save2[0] = pci_conf_read(sc->sc_pc,
+ sc->sc_tag, AMD756_CHANSTATUS_EN);
+ sc->sc_save2[1] = pci_conf_read(sc->sc_pc,
+ sc->sc_tag, AMD756_DATATIM);
+ sc->sc_save2[2] = pci_conf_read(sc->sc_pc,
+ sc->sc_tag, AMD756_CYCLE_ADDR_TIME);
+ sc->sc_save2[3] = pci_conf_read(sc->sc_pc,
+ sc->sc_tag, AMD756_UDMA);
}
break;
case DVACT_RESUME:
@@ -1488,6 +1497,15 @@ pciide_activate(struct device *self, int act)
NFORCE_PIOTIM, sc->sc_save2[1]);
pci_conf_write(sc->sc_pc, sc->sc_tag,
NFORCE_UDMATIM, sc->sc_save2[2]);
+ } else if (sc->sc_pp->chip_map == amd756_chip_map) {
+ pci_conf_write(sc->sc_pc, sc->sc_tag,
+ AMD756_CHANSTATUS_EN, sc->sc_save2[0]);
+ pci_conf_write(sc->sc_pc, sc->sc_tag,
+ AMD756_DATATIM, sc->sc_save2[1]);
+ pci_conf_write(sc->sc_pc, sc->sc_tag,
+ AMD756_CYCLE_ADDR_TIME, sc->sc_save2[2]);
+ pci_conf_write(sc->sc_pc, sc->sc_tag,
+ AMD756_UDMA, sc->sc_save2[3]);
} else {
printf("%s: restore for unknown chip map %x\n",
sc->sc_wdcdev.sc_dev.dv_xname,