aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-19 13:50:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-19 13:50:30 -0400
commitb29f83aa8b7018cdbe687dd57b239160e25889f0 (patch)
tree224532c951bff92d37788511d39d9173bce24152 /arch
parent73030efad5bd280ae9c3b5073710786e6300906e (diff)
parent649ae75286793304130e747efa7d1a88daaf7e2e (diff)
Merge tag 'pci-v3.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fixes from Bjorn Helgaas: "These fix: - Boot video device detection on dual-GPU Apple systems - Hotplug fiascos on VGA switcheroo with radeon & nouveau drivers - Boot hang on Freescale i.MX6 systems - Excessive "no hotplug settings from platform" warnings In particular: Enumeration - Don't default exclusively to first video device (Bruno Prémont) PCI device hotplug - Remove "no hotplug settings from platform" warning (Bjorn Helgaas) - Add pci_ignore_hotplug() for VGA switcheroo (Bjorn Helgaas) Freescale i.MX6 - Put LTSSM in "Detect" state before disabling (Lucas Stach)" * tag 'pci-v3.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: vgaarb: Drop obsolete #ifndef vgaarb: Don't default exclusively to first video device with mem+io ACPIPHP / radeon / nouveau: Remove acpi_bus_no_hotplug() PCI: Remove "no hotplug settings from platform" warning PCI: Add pci_ignore_hotplug() to ignore hotplug events for a device PCI: imx6: Put LTSSM in "Detect" state before disabling it MAINTAINERS: Add Lucas Stach as co-maintainer for i.MX6 PCI driver
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/pci/fixup.c24
-rw-r--r--arch/x86/pci/fixup.c24
2 files changed, 2 insertions, 46 deletions
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c
index ec73b2cf912a..fc505d58f078 100644
--- a/arch/ia64/pci/fixup.c
+++ b/arch/ia64/pci/fixup.c
@@ -38,27 +38,6 @@ static void pci_fixup_video(struct pci_dev *pdev)
38 return; 38 return;
39 /* Maybe, this machine supports legacy memory map. */ 39 /* Maybe, this machine supports legacy memory map. */
40 40
41 if (!vga_default_device()) {
42 resource_size_t start, end;
43 int i;
44
45 /* Does firmware framebuffer belong to us? */
46 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
47 if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM))
48 continue;
49
50 start = pci_resource_start(pdev, i);
51 end = pci_resource_end(pdev, i);
52
53 if (!start || !end)
54 continue;
55
56 if (screen_info.lfb_base >= start &&
57 (screen_info.lfb_base + screen_info.lfb_size) < end)
58 vga_set_default_device(pdev);
59 }
60 }
61
62 /* Is VGA routed to us? */ 41 /* Is VGA routed to us? */
63 bus = pdev->bus; 42 bus = pdev->bus;
64 while (bus) { 43 while (bus) {
@@ -83,8 +62,7 @@ static void pci_fixup_video(struct pci_dev *pdev)
83 pci_read_config_word(pdev, PCI_COMMAND, &config); 62 pci_read_config_word(pdev, PCI_COMMAND, &config);
84 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { 63 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
85 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; 64 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
86 dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); 65 dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n");
87 vga_set_default_device(pdev);
88 } 66 }
89 } 67 }
90} 68}
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index c61ea57d1ba1..9a2b7101ae8a 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -326,27 +326,6 @@ static void pci_fixup_video(struct pci_dev *pdev)
326 struct pci_bus *bus; 326 struct pci_bus *bus;
327 u16 config; 327 u16 config;
328 328
329 if (!vga_default_device()) {
330 resource_size_t start, end;
331 int i;
332
333 /* Does firmware framebuffer belong to us? */
334 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
335 if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM))
336 continue;
337
338 start = pci_resource_start(pdev, i);
339 end = pci_resource_end(pdev, i);
340
341 if (!start || !end)
342 continue;
343
344 if (screen_info.lfb_base >= start &&
345 (screen_info.lfb_base + screen_info.lfb_size) < end)
346 vga_set_default_device(pdev);
347 }
348 }
349
350 /* Is VGA routed to us? */ 329 /* Is VGA routed to us? */
351 bus = pdev->bus; 330 bus = pdev->bus;
352 while (bus) { 331 while (bus) {
@@ -371,8 +350,7 @@ static void pci_fixup_video(struct pci_dev *pdev)
371 pci_read_config_word(pdev, PCI_COMMAND, &config); 350 pci_read_config_word(pdev, PCI_COMMAND, &config);
372 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { 351 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
373 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; 352 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
374 dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); 353 dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n");
375 vga_set_default_device(pdev);
376 } 354 }
377 } 355 }
378} 356}