diff options
author | Jacob Pan <jacob.jun.pan@linux.intel.com> | 2012-02-13 07:59:00 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-02-23 15:31:36 -0500 |
commit | 990a30c50c2bb3c4570aec7c33bedb969d089b7b (patch) | |
tree | 4c1dbd9c61b99b74d527a401340bf6897a1f916b /arch/x86/pci | |
parent | 7570a333d8b00e7fd4b05d898e353000a70210ce (diff) |
x86/mrst/pci: assign d3_delay to 0 for Langwell devices
Langwell devices are not true pci devices, they are not subject to the 10 ms
d3 to d0 delay required by pci spec. This patch assigns d3_delay to 0 for all
langwell pci devices.
We can also power off devices that are not really used by the OS
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r-- | arch/x86/pci/mrst.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c index cb29191cee58..89e55485c787 100644 --- a/arch/x86/pci/mrst.c +++ b/arch/x86/pci/mrst.c | |||
@@ -239,6 +239,30 @@ int __init pci_mrst_init(void) | |||
239 | return 1; | 239 | return 1; |
240 | } | 240 | } |
241 | 241 | ||
242 | /* Langwell devices are not true pci devices, they are not subject to 10 ms | ||
243 | * d3 to d0 delay required by pci spec. | ||
244 | */ | ||
245 | static void __devinit pci_d3delay_fixup(struct pci_dev *dev) | ||
246 | { | ||
247 | /* true pci devices in lincroft should allow type 1 access, the rest | ||
248 | * are langwell fake pci devices. | ||
249 | */ | ||
250 | if (type1_access_ok(dev->bus->number, dev->devfn, PCI_DEVICE_ID)) | ||
251 | return; | ||
252 | dev->d3_delay = 0; | ||
253 | } | ||
254 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); | ||
255 | |||
256 | static void __devinit mrst_power_off_unused_dev(struct pci_dev *dev) | ||
257 | { | ||
258 | pci_set_power_state(dev, PCI_D3cold); | ||
259 | } | ||
260 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0801, mrst_power_off_unused_dev); | ||
261 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0809, mrst_power_off_unused_dev); | ||
262 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x080C, mrst_power_off_unused_dev); | ||
263 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0812, mrst_power_off_unused_dev); | ||
264 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mrst_power_off_unused_dev); | ||
265 | |||
242 | /* | 266 | /* |
243 | * Langwell devices reside at fixed offsets, don't try to move them. | 267 | * Langwell devices reside at fixed offsets, don't try to move them. |
244 | */ | 268 | */ |