cube@ says that acpi_pci_fixup() only writes in devices interrupt line

registers, so restore the PCI-ISA bridge IRQ routing here again.
This commit is contained in:
jmcneill 2006-06-19 10:08:16 +00:00
parent 835f09ae96
commit 3c27eb63b5
2 changed files with 41 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ichlpcib.c,v 1.14 2006/06/19 02:30:35 jmcneill Exp $ */
/* $NetBSD: ichlpcib.c,v 1.15 2006/06/19 10:08:16 jmcneill Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.14 2006/06/19 02:30:35 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.15 2006/06/19 10:08:16 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -78,6 +78,7 @@ struct lpcib_softc {
/* Power management */
void *sc_powerhook;
struct pci_conf_state sc_pciconf;
pcireg_t sc_pirq[8];
};
static int lpcibmatch(struct device *, struct cfdata *, void *);
@ -177,10 +178,32 @@ lpcib_powerhook(int why, void *opaque)
switch (why) {
case PWR_SUSPEND:
pci_conf_capture(pc, tag, &sc->sc_pciconf);
/* capture PIRQ routing control registers */
sc->sc_pirq[0] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQA_ROUT);
sc->sc_pirq[1] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQB_ROUT);
sc->sc_pirq[2] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQC_ROUT);
sc->sc_pirq[3] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQD_ROUT);
sc->sc_pirq[4] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQE_ROUT);
sc->sc_pirq[5] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQF_ROUT);
sc->sc_pirq[6] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQG_ROUT);
sc->sc_pirq[7] = pci_conf_read(pc, tag, LPCIB_PCI_PIRQH_ROUT);
break;
case PWR_RESUME:
pci_conf_restore(pc, tag, &sc->sc_pciconf);
/* restore PIRQ routing control registers */
pci_conf_write(pc, tag, LPCIB_PCI_PIRQA_ROUT, sc->sc_pirq[0]);
pci_conf_write(pc, tag, LPCIB_PCI_PIRQB_ROUT, sc->sc_pirq[1]);
pci_conf_write(pc, tag, LPCIB_PCI_PIRQC_ROUT, sc->sc_pirq[2]);
pci_conf_write(pc, tag, LPCIB_PCI_PIRQD_ROUT, sc->sc_pirq[3]);
pci_conf_write(pc, tag, LPCIB_PCI_PIRQE_ROUT, sc->sc_pirq[4]);
pci_conf_write(pc, tag, LPCIB_PCI_PIRQF_ROUT, sc->sc_pirq[5]);
pci_conf_write(pc, tag, LPCIB_PCI_PIRQG_ROUT, sc->sc_pirq[6]);
pci_conf_write(pc, tag, LPCIB_PCI_PIRQH_ROUT, sc->sc_pirq[7]);
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: piixpcib.c,v 1.5 2006/06/19 02:30:35 jmcneill Exp $ */
/* $NetBSD: piixpcib.c,v 1.6 2006/06/19 10:08:16 jmcneill Exp $ */
/*-
* Copyright (c) 2004, 2006 The NetBSD Foundation, Inc.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: piixpcib.c,v 1.5 2006/06/19 02:30:35 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: piixpcib.c,v 1.6 2006/06/19 10:08:16 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -77,6 +77,8 @@ struct piixpcib_softc {
void *sc_powerhook;
struct pci_conf_state sc_pciconf;
pcireg_t sc_pirqrc[4];
};
static int piixpcibmatch(struct device *, struct cfdata *, void *);
@ -164,9 +166,21 @@ piixpcib_powerhook(int why, void *opaque)
switch (why) {
case PWR_SUSPEND:
pci_conf_capture(pc, tag, &sc->sc_pciconf);
/* capture PIRQX route control registers */
sc->sc_pirqrc[0] = pci_conf_read(pc, tag, PIIX4_PIRQRCA);
sc->sc_pirqrc[1] = pci_conf_read(pc, tag, PIIX4_PIRQRCB);
sc->sc_pirqrc[2] = pci_conf_read(pc, tag, PIIX4_PIRQRCC);
sc->sc_pirqrc[3] = pci_conf_read(pc, tag, PIIX4_PIRQRCD);
break;
case PWR_RESUME:
pci_conf_restore(pc, tag, &sc->sc_pciconf);
/* restore PIRQX route control registers */
pci_conf_write(pc, tag, PIIX4_PIRQRCA, sc->sc_pirqrc[0]);
pci_conf_write(pc, tag, PIIX4_PIRQRCB, sc->sc_pirqrc[1]);
pci_conf_write(pc, tag, PIIX4_PIRQRCC, sc->sc_pirqrc[2]);
pci_conf_write(pc, tag, PIIX4_PIRQRCD, sc->sc_pirqrc[3]);
break;
}