aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/pci/fixup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/pci/fixup.c')
-rw-r--r--arch/ia64/pci/fixup.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c
index fc505d58f078..41caa99add51 100644
--- a/arch/ia64/pci/fixup.c
+++ b/arch/ia64/pci/fixup.c
@@ -17,14 +17,14 @@
17 * 17 *
18 * The standard boot ROM sequence for an x86 machine uses the BIOS 18 * The standard boot ROM sequence for an x86 machine uses the BIOS
19 * to select an initial video card for boot display. This boot video 19 * to select an initial video card for boot display. This boot video
20 * card will have it's BIOS copied to C0000 in system RAM. 20 * card will have its BIOS copied to 0xC0000 in system RAM.
21 * IORESOURCE_ROM_SHADOW is used to associate the boot video 21 * IORESOURCE_ROM_SHADOW is used to associate the boot video
22 * card with this copy. On laptops this copy has to be used since 22 * card with this copy. On laptops this copy has to be used since
23 * the main ROM may be compressed or combined with another image. 23 * the main ROM may be compressed or combined with another image.
24 * See pci_map_rom() for use of this flag. Before marking the device 24 * See pci_map_rom() for use of this flag. Before marking the device
25 * with IORESOURCE_ROM_SHADOW check if a vga_default_device is already set 25 * with IORESOURCE_ROM_SHADOW check if a vga_default_device is already set
26 * by either arch cde or vga-arbitration, if so only apply the fixup to this 26 * by either arch code or vga-arbitration; if so only apply the fixup to this
27 * already determined primary video card. 27 * already-determined primary video card.
28 */ 28 */
29 29
30static void pci_fixup_video(struct pci_dev *pdev) 30static void pci_fixup_video(struct pci_dev *pdev)
@@ -32,6 +32,7 @@ static void pci_fixup_video(struct pci_dev *pdev)
32 struct pci_dev *bridge; 32 struct pci_dev *bridge;
33 struct pci_bus *bus; 33 struct pci_bus *bus;
34 u16 config; 34 u16 config;
35 struct resource *res;
35 36
36 if ((strcmp(ia64_platform_name, "dig") != 0) 37 if ((strcmp(ia64_platform_name, "dig") != 0)
37 && (strcmp(ia64_platform_name, "hpzx1") != 0)) 38 && (strcmp(ia64_platform_name, "hpzx1") != 0))
@@ -61,8 +62,18 @@ static void pci_fixup_video(struct pci_dev *pdev)
61 if (!vga_default_device() || pdev == vga_default_device()) { 62 if (!vga_default_device() || pdev == vga_default_device()) {
62 pci_read_config_word(pdev, PCI_COMMAND, &config); 63 pci_read_config_word(pdev, PCI_COMMAND, &config);
63 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { 64 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
64 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; 65 res = &pdev->resource[PCI_ROM_RESOURCE];
65 dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n"); 66
67 pci_disable_rom(pdev);
68 if (res->parent)
69 release_resource(res);
70
71 res->start = 0xC0000;
72 res->end = res->start + 0x20000 - 1;
73 res->flags = IORESOURCE_MEM | IORESOURCE_ROM_SHADOW |
74 IORESOURCE_PCI_FIXED;
75 dev_info(&pdev->dev, "Video device with shadowed ROM at %pR\n",
76 res);
66 } 77 }
67 } 78 }
68} 79}