public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/2] x86/platform/intel_mid_pci: Remove duplicate power off
@ 2016-07-05 20:09 Andy Shevchenko
  2016-07-05 20:09 ` [PATCH v1 2/2] x86/platform/intel-mid: Extend PWRMU to support Penwell Andy Shevchenko
  2016-07-08 12:04 ` [tip:x86/platform] x86/pci, x86/platform/intel_mid_pci: Remove duplicate power off code tip-bot for Andy Shevchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2016-07-05 20:09 UTC (permalink / raw)
  To: linux-kernel, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86
  Cc: Andy Shevchenko

Intel MID platforms (Moorestown, Medfield, Clovertrail, Merrifield) are sharing
the code in intel_mid_pci.c module. There is no need to power off specific
Moorestown devices after 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
functions to show that they are applied to any of Intel MID platforms.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/pci/intel_mid_pci.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
index a971043..5413d6a 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)
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup);
 
-static void mid_power_off_dev(struct pci_dev *dev)
+static void mid_power_off_one_device(struct pci_dev *dev)
 {
 	u16 pmcsr;
 
@@ -330,12 +330,7 @@ static void mid_power_off_dev(struct pci_dev *dev)
 	pci_set_power_state(dev, PCI_D3hot);
 }
 
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0801, mid_power_off_dev);
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0809, mid_power_off_dev);
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x080C, mid_power_off_dev);
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mid_power_off_dev);
-
-static void mrfld_power_off_dev(struct pci_dev *dev)
+static void mid_power_off_devices(struct pci_dev *dev)
 {
 	int id;
 
@@ -350,10 +345,10 @@ static void mrfld_power_off_dev(struct pci_dev *dev)
 	 * This sets only PMCSR bits. The actual power off will happen in
 	 * arch/x86/platform/intel-mid/pwr.c.
 	 */
-	mid_power_off_dev(dev);
+	mid_power_off_one_device(dev);
 }
 
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, mrfld_power_off_dev);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, mid_power_off_devices);
 
 /*
  * Langwell devices reside at fixed offsets, don't try to move them.
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-08 12:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 20:09 [PATCH v1 1/2] x86/platform/intel_mid_pci: Remove duplicate power off Andy Shevchenko
2016-07-05 20:09 ` [PATCH v1 2/2] x86/platform/intel-mid: Extend PWRMU to support Penwell Andy Shevchenko
2016-07-08 12:04   ` [tip:x86/platform] " tip-bot for Andy Shevchenko
2016-07-08 12:04 ` [tip:x86/platform] x86/pci, x86/platform/intel_mid_pci: Remove duplicate power off code tip-bot for Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox