aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
authorEiichiro Oiwa <eiichiro.oiwa.nm@hitachi.com>2006-10-23 02:14:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-27 14:20:33 -0400
commit6b5c76b8e2ff204fa8d7201acce461188873bf2b (patch)
tree6e3864c98fdcca8aa5609ad799349513d9372a10 /drivers/pci/quirks.c
parent35ae61a0f43ebbabc3cb4345136ca529fc4d6700 (diff)
PCI: fix pci_fixup_video as it blows up on sparc64
This reverts much of the original pci_fixup_video change and makes it work for all arches that need it. fixed, and tested on x86, x86_64 and IA64 dig. Signed-off-by: Eiichiro Oiwa <eiichiro.oiwa.nm@hitachi.com> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index e8a7f1b1b2bc..687ab4a0c6c6 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1619,52 +1619,6 @@ static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
1619} 1619}
1620DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); 1620DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810);
1621 1621
1622/*
1623 * Fixup to mark boot BIOS video selected by BIOS before it changes
1624 *
1625 * From information provided by "Jon Smirl" <jonsmirl@gmail.com>
1626 *
1627 * The standard boot ROM sequence for an x86 machine uses the BIOS
1628 * to select an initial video card for boot display. This boot video
1629 * card will have it's BIOS copied to C0000 in system RAM.
1630 * IORESOURCE_ROM_SHADOW is used to associate the boot video
1631 * card with this copy. On laptops this copy has to be used since
1632 * the main ROM may be compressed or combined with another image.
1633 * See pci_map_rom() for use of this flag. IORESOURCE_ROM_SHADOW
1634 * is marked here since the boot video device will be the only enabled
1635 * video device at this point.
1636 */
1637
1638static void __devinit fixup_video(struct pci_dev *pdev)
1639{
1640 struct pci_dev *bridge;
1641 struct pci_bus *bus;
1642 u16 config;
1643
1644 if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
1645 return;
1646
1647 /* Is VGA routed to us? */
1648 bus = pdev->bus;
1649 while (bus) {
1650 bridge = bus->self;
1651 if (bridge) {
1652 pci_read_config_word(bridge, PCI_BRIDGE_CONTROL,
1653 &config);
1654 if (!(config & PCI_BRIDGE_CTL_VGA))
1655 return;
1656 }
1657 bus = bus->parent;
1658 }
1659 pci_read_config_word(pdev, PCI_COMMAND, &config);
1660 if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
1661 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
1662 printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev));
1663 }
1664}
1665DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_video);
1666
1667
1668static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) 1622static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end)
1669{ 1623{
1670 while (f < end) { 1624 while (f < end) {