aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-02-13 07:59:37 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-02-23 15:33:27 -0500
commit823806ff6bd63f92644a5330cf0c3b68fac25ffd (patch)
tree626dd2e694f7591736c91d706ada528783b759cc /arch/x86/pci
parent8ed3087280ee8c527b7090887e333761a9c75474 (diff)
x86/mrst/pci: avoid SoC fixups on non-SoC platforms
The PCI fixups get executed based upon whether they are linked in. We need to avoid executing them if we boot a dual SoC/PC type kernel on a PC class system. 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.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
index c5e81a4d7c1e..140942f66b31 100644
--- a/arch/x86/pci/mrst.c
+++ b/arch/x86/pci/mrst.c
@@ -43,6 +43,8 @@
43#define PCI_FIXED_BAR_4_SIZE 0x14 43#define PCI_FIXED_BAR_4_SIZE 0x14
44#define PCI_FIXED_BAR_5_SIZE 0x1c 44#define PCI_FIXED_BAR_5_SIZE 0x1c
45 45
46static int pci_soc_mode = 0;
47
46/** 48/**
47 * fixed_bar_cap - return the offset of the fixed BAR cap if found 49 * fixed_bar_cap - return the offset of the fixed BAR cap if found
48 * @bus: PCI bus 50 * @bus: PCI bus
@@ -233,10 +235,11 @@ struct pci_ops pci_mrst_ops = {
233 */ 235 */
234int __init pci_mrst_init(void) 236int __init pci_mrst_init(void)
235{ 237{
236 printk(KERN_INFO "Moorestown platform detected, using MRST PCI ops\n"); 238 printk(KERN_INFO "Intel MID platform detected, using MID PCI ops\n");
237 pci_mmcfg_late_init(); 239 pci_mmcfg_late_init();
238 pcibios_enable_irq = mrst_pci_irq_enable; 240 pcibios_enable_irq = mrst_pci_irq_enable;
239 pci_root_ops = pci_mrst_ops; 241 pci_root_ops = pci_mrst_ops;
242 pci_soc_mode = 1;
240 /* Continue with standard init */ 243 /* Continue with standard init */
241 return 1; 244 return 1;
242} 245}
@@ -246,6 +249,10 @@ int __init pci_mrst_init(void)
246 */ 249 */
247static void __devinit pci_d3delay_fixup(struct pci_dev *dev) 250static void __devinit pci_d3delay_fixup(struct pci_dev *dev)
248{ 251{
252 /* PCI fixups are effectively decided compile time. If we have a dual
253 SoC/non-SoC kernel we don't want to mangle d3 on non SoC devices */
254 if (!pci_soc_mode)
255 return;
249 /* true pci devices in lincroft should allow type 1 access, the rest 256 /* true pci devices in lincroft should allow type 1 access, the rest
250 * are langwell fake pci devices. 257 * are langwell fake pci devices.
251 */ 258 */
@@ -274,6 +281,9 @@ static void __devinit pci_fixed_bar_fixup(struct pci_dev *dev)
274 u32 size; 281 u32 size;
275 int i; 282 int i;
276 283
284 if (!pci_soc_mode)
285 return;
286
277 /* Must have extended configuration space */ 287 /* Must have extended configuration space */
278 if (dev->cfg_size < PCIE_CAP_OFFSET + 4) 288 if (dev->cfg_size < PCIE_CAP_OFFSET + 4)
279 return; 289 return;