Merge branch 'fix/hda' into topic/hda
[pandora-kernel.git] / arch / powerpc / platforms / pseries / pci.c
index 715db5c..2c6ded2 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/pci.h>
 #include <linux/string.h>
 
+#include <asm/eeh.h>
 #include <asm/pci-bridge.h>
 #include <asm/prom.h>
 #include <asm/ppc-pci.h>
@@ -39,7 +40,7 @@ void pcibios_name_device(struct pci_dev *dev)
         */
        dn = pci_device_to_OF_node(dev);
        if (dn) {
-               char *loc_code = get_property(dn, "ibm,loc-code", 0);
+               const char *loc_code = of_get_property(dn, "ibm,loc-code", 0);
                if (loc_code) {
                        int loc_len = strlen(loc_code);
                        if (loc_len < sizeof(dev->dev.name)) {
@@ -77,7 +78,7 @@ void __init pSeries_final_fixup(void)
 
 /*
  * Assume the winbond 82c105 is the IDE controller on a
- * p610 We should probably be more careful in case
+ * p610/p615/p630. We should probably be more careful in case
  * someone tries to plug in a similar adapter.
  */
 static void fixup_winbond_82c105(struct pci_dev* dev)
@@ -98,6 +99,10 @@ static void fixup_winbond_82c105(struct pci_dev* dev)
                if (dev->resource[i].flags & IORESOURCE_IO
                    && dev->bus->number == 0 && dev->devfn == 0x81)
                        dev->resource[i].flags &= ~IORESOURCE_IO;
+               if (dev->resource[i].start == 0 && dev->resource[i].end) {
+                       dev->resource[i].flags = 0;
+                       dev->resource[i].end = 0;
+               }
        }
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,