]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/maple/pci.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / maple / pci.c
index fceaae40fe7033c70947f3c9f65680d2b0671c0a..301855263b8157cbf9c7fd75228a44a01044137e 100644 (file)
@@ -169,15 +169,12 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn,
        switch (len) {
        case 1:
                out_8(addr, val);
-               (void) in_8(addr);
                break;
        case 2:
                out_le16(addr, val);
-               (void) in_le16(addr);
                break;
        default:
                out_le32(addr, val);
-               (void) in_le32(addr);
                break;
        }
        return PCIBIOS_SUCCESSFUL;
@@ -185,8 +182,8 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn,
 
 static struct pci_ops u3_agp_pci_ops =
 {
-       u3_agp_read_config,
-       u3_agp_write_config
+       .read = u3_agp_read_config,
+       .write = u3_agp_write_config,
 };
 
 static unsigned long u3_ht_cfa0(u8 devfn, u8 off)
@@ -268,15 +265,12 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
        switch (len) {
        case 1:
                out_8(addr, val);
-               (void) in_8(addr);
                break;
        case 2:
                out_le16(addr, val);
-               (void) in_le16(addr);
                break;
        default:
                out_le32(addr, val);
-               (void) in_le32(addr);
                break;
        }
        return PCIBIOS_SUCCESSFUL;
@@ -284,8 +278,8 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
 
 static struct pci_ops u3_ht_pci_ops =
 {
-       u3_ht_read_config,
-       u3_ht_write_config
+       .read = u3_ht_read_config,
+       .write = u3_ht_write_config,
 };
 
 static unsigned int u4_pcie_cfa0(unsigned int devfn, unsigned int off)
@@ -376,15 +370,12 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
         switch (len) {
         case 1:
                 out_8(addr, val);
-                (void) in_8(addr);
                 break;
         case 2:
                 out_le16(addr, val);
-                (void) in_le16(addr);
                 break;
         default:
                 out_le32(addr, val);
-                (void) in_le32(addr);
                 break;
         }
         return PCIBIOS_SUCCESSFUL;
@@ -392,8 +383,8 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
 
 static struct pci_ops u4_pcie_pci_ops =
 {
-        u4_pcie_read_config,
-        u4_pcie_write_config
+       .read = u4_pcie_read_config,
+       .write = u4_pcie_write_config,
 };
 
 static void __init setup_u3_agp(struct pci_controller* hose)
@@ -490,6 +481,9 @@ static int __init maple_add_bridge(struct device_node *dev)
        /* Fixup "bus-range" OF property */
        fixup_bus_range(dev);
 
+       /* Check for legacy IOs */
+       isa_bridge_find_early(hose);
+
        return 0;
 }
 
@@ -564,7 +558,7 @@ void __init maple_pci_init(void)
         * safe assumptions hopefully.
         */
        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;
@@ -598,50 +592,3 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
        }
        return irq;
 }
-
-/* XXX: To remove once all firmwares are ok */
-static void fixup_maple_ide(struct pci_dev* dev)
-{
-       if (!machine_is(maple))
-               return;
-
-#if 0 /* Enable this to enable IDE port 0 */
-       {
-               u8 v;
-
-               pci_read_config_byte(dev, 0x40, &v);
-               v |= 2;
-               pci_write_config_byte(dev, 0x40, v);
-       }
-#endif
-#if 0 /* fix bus master base */
-       pci_write_config_dword(dev, 0x20, 0xcc01);
-       printk("old ide resource: %lx -> %lx \n",
-              dev->resource[4].start, dev->resource[4].end);
-       dev->resource[4].start = 0xcc00;
-       dev->resource[4].end = 0xcc10;
-#endif
-#if 0 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */
-       {
-               struct pci_dev *apicdev;
-               u32 v;
-
-               apicdev = pci_get_slot (dev->bus, PCI_DEVFN(5,0));
-               if (apicdev == NULL)
-                       printk("IDE Fixup IRQ: Can't find IO-APIC !\n");
-               else {
-                       pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*14);
-                       pci_read_config_dword(apicdev, 0xf4, &v);
-                       v &= ~0x00000022;
-                       pci_write_config_dword(apicdev, 0xf4, v);
-                       pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*15);
-                       pci_read_config_dword(apicdev, 0xf4, &v);
-                       v &= ~0x00000022;
-                       pci_write_config_dword(apicdev, 0xf4, v);
-                       pci_dev_put(apicdev);
-               }
-       }
-#endif
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE,
-                        fixup_maple_ide);