diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-09-07 19:23:54 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-09-07 19:23:54 +0000 |
commit | 9670d78d8166a9c529cde3b99982a2c0d841768d (patch) | |
tree | eb7e7d6b9962f518f9e671e160d258ffc4397b9a /sys/arch/i386/pci | |
parent | 3e3ba5e5a288a24670663a576b086752354d390b (diff) |
Implement pci_min_powerstate().
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.c | 16 | ||||
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.h | 4 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c index 0fecc1935b9..3d513608dd9 100644 --- a/sys/arch/i386/pci/pci_machdep.c +++ b/sys/arch/i386/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.68 2011/12/04 20:08:09 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.69 2012/09/07 19:23:53 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */ /*- @@ -935,3 +935,17 @@ pci_dev_postattach(struct device *dev, struct pci_attach_args *pa) acpi_pci_match(dev, pa); #endif } + +#if NACPI > 0 +pcireg_t acpi_pci_min_powerstate(pci_chipset_tag_t, pcitag_t); +#endif + +pcireg_t +pci_min_powerstate(pci_chipset_tag_t pc, pcitag_t tag) +{ +#if NACPI > 0 + return acpi_pci_min_powerstate(pc, tag); +#else + return PCI_PMCSR_STATE_D3; +#endif +} diff --git a/sys/arch/i386/pci/pci_machdep.h b/sys/arch/i386/pci/pci_machdep.h index a358597e65e..0ff7a031b3a 100644 --- a/sys/arch/i386/pci/pci_machdep.h +++ b/sys/arch/i386/pci/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.23 2011/10/10 19:42:36 miod Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.24 2012/09/07 19:23:53 kettenis Exp $ */ /* $NetBSD: pci_machdep.h,v 1.7 1997/06/06 23:29:18 thorpej Exp $ */ /* @@ -109,6 +109,8 @@ void pci_decompose_tag(pci_chipset_tag_t, pcitag_t, void pci_dev_postattach(struct device *, struct pci_attach_args *); +pcireg_t pci_min_powerstate(pci_chipset_tag_t, pcitag_t); + /* * Section 6.2.4, `Miscellaneous Functions' of the PIC Specification, * says that 255 means `unknown' or `no connection' to the interrupt |