diff options
author | Paul Mackerras <paulus@samba.org> | 2007-12-11 15:30:27 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-11 15:30:27 +1100 |
commit | cfad589f565bdaa69d45fb1c0db124727a6eaf6e (patch) | |
tree | 0582935064aa9e6ba0c80efaf6c0ef35ff8c3867 /arch/powerpc/platforms/powermac/pci.c | |
parent | bc625f20c08c5a5438a9fa3bb6d67fd84b1bab4b (diff) | |
parent | 437105f2a7f23899fd647e7ada683ba8dacf11ba (diff) | |
download | op-kernel-dev-cfad589f565bdaa69d45fb1c0db124727a6eaf6e.zip op-kernel-dev-cfad589f565bdaa69d45fb1c0db124727a6eaf6e.tar.gz |
Merge branch 'linux-2.6' into for-2.6.25
Diffstat (limited to 'arch/powerpc/platforms/powermac/pci.c')
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 778c249..589c613 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c @@ -1243,15 +1243,22 @@ void pmac_pci_fixup_pciata(struct pci_dev* dev) good: pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); if ((progif & 5) != 5) { - printk(KERN_INFO "Forcing PCI IDE into native mode: %s\n", + printk(KERN_INFO "PCI: %s Forcing PCI IDE into native mode\n", pci_name(dev)); (void) pci_write_config_byte(dev, PCI_CLASS_PROG, progif|5); if (pci_read_config_byte(dev, PCI_CLASS_PROG, &progif) || (progif & 5) != 5) printk(KERN_ERR "Rewrite of PROGIF failed !\n"); + else { + /* Clear IO BARs, they will be reassigned */ + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, 0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, 0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_2, 0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_3, 0); + } } } -DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata); +DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata); #endif /* |