]> err.no Git - linux-2.6/commitdiff
Merge branch 'linux-2.6' into for-2.6.25
authorPaul Mackerras <paulus@samba.org>
Tue, 11 Dec 2007 04:30:27 +0000 (15:30 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 11 Dec 2007 04:30:27 +0000 (15:30 +1100)
1  2 
arch/powerpc/platforms/powermac/pci.c

index 778c249d88156221bb52c3a4f72e93d5d6a547ca,f852ae3e0ee42a016adc6155b2f5c37942f6dbc5..589c613bcd3c290b887b01d3da3c6e59d5a155c4
@@@ -319,7 -319,7 +319,7 @@@ static int u3_ht_skip_device(struct pci
        if (bus->self)
                busdn = pci_device_to_OF_node(bus->self);
        else
 -              busdn = hose->arch_data;
 +              busdn = hose->dn;
        for (dn = busdn->child; dn; dn = dn->sibling)
                if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn)
                        break;
@@@ -778,7 -778,7 +778,7 @@@ static void __init setup_u4_pcie(struc
  
  static void __init setup_u3_ht(struct pci_controller* hose)
  {
 -      struct device_node *np = (struct device_node *)hose->arch_data;
 +      struct device_node *np = hose->dn;
        struct pci_controller *other = NULL;
        int i, cur;
  
@@@ -1032,7 -1032,7 +1032,7 @@@ void __init pmac_pci_init(void
         * future though
         */
        if (u3_agp) {
 -              struct device_node *np = u3_agp->arch_data;
 +              struct device_node *np = u3_agp->dn;
                PCI_DN(np)->busno = 0xf0;
                for (np = np->child; np; np = np->sibling)
                        PCI_DN(np)->busno = 0xf0;
@@@ -1243,15 -1243,22 +1243,22 @@@ void pmac_pci_fixup_pciata(struct pci_d
   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
  
  /*