aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-07-05 16:09:07 -0400
committerIngo Molnar <mingo@kernel.org>2016-07-08 05:00:05 -0400
commite99a0745bdf8a5f7e3126a686846af4aeb852cc9 (patch)
tree47816e2f5d5ad9b58c56976d2371b34d8613316d
parent0519e8b4cb2bda598f941088948129f9fe9e6acd (diff)
x86/pci, x86/platform/intel_mid_pci: Remove duplicate power off code
Intel MID platforms (Moorestown, Medfield, Clovertrail, Merrifield) are sharing the code in the intel_mid_pci.c module. There is no need to power off specific Moorestown devices after the following commit: 5823d0893ec2 ("x86/platform/intel-mid: Add Power Management Unit driver") ... because the condition in mrfld_power_off_dev() is true for any platform from the above list. Remove duplicate power off certain devices on Intel Moorestown and rename the affected functions to show that they are applied to any of Intel MID platforms. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1467749348-100518-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/pci/intel_mid_pci.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
index a9710433be4d..5413d6a9817c 100644
--- a/arch/x86/pci/intel_mid_pci.c
+++ b/arch/x86/pci/intel_mid_pci.c
@@ -316,7 +316,7 @@ static void pci_d3delay_fixup(struct pci_dev *dev)
316} 316}
317DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); 317DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup);
318 318
319static void mid_power_off_dev(struct pci_dev *dev) 319static void mid_power_off_one_device(struct pci_dev *dev)
320{ 320{
321 u16 pmcsr; 321 u16 pmcsr;
322 322
@@ -330,12 +330,7 @@ static void mid_power_off_dev(struct pci_dev *dev)
330 pci_set_power_state(dev, PCI_D3hot); 330 pci_set_power_state(dev, PCI_D3hot);
331} 331}
332 332
333DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0801, mid_power_off_dev); 333static void mid_power_off_devices(struct pci_dev *dev)
334DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0809, mid_power_off_dev);
335DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x080C, mid_power_off_dev);
336DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mid_power_off_dev);
337
338static void mrfld_power_off_dev(struct pci_dev *dev)
339{ 334{
340 int id; 335 int id;
341 336
@@ -350,10 +345,10 @@ static void mrfld_power_off_dev(struct pci_dev *dev)
350 * This sets only PMCSR bits. The actual power off will happen in 345 * This sets only PMCSR bits. The actual power off will happen in
351 * arch/x86/platform/intel-mid/pwr.c. 346 * arch/x86/platform/intel-mid/pwr.c.
352 */ 347 */
353 mid_power_off_dev(dev); 348 mid_power_off_one_device(dev);
354} 349}
355 350
356DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, mrfld_power_off_dev); 351DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, mid_power_off_devices);
357 352
358/* 353/*
359 * Langwell devices reside at fixed offsets, don't try to move them. 354 * Langwell devices reside at fixed offsets, don't try to move them.