]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/cell/io-workarounds.c
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / cell / io-workarounds.c
index d68d920eb2c4e6bbe8894c3c3dc99caefb8a8fe5..979d4b67efb45dcb6562133d2d977ebed6de14e4 100644 (file)
@@ -74,7 +74,7 @@ static void spider_io_flush(const volatile void __iomem *addr)
        /* Fast path if we have a non-0 token, it indicates which bus we
         * are on.
         *
-        * If the token is 0, that means either the the ioremap was done
+        * If the token is 0, that means either that the ioremap was done
         * before we initialized this layer, or it's a PIO operation. We
         * fallback to a low path in this case. Hopefully, internal devices
         * which are ioremap'ed early should use in_XX/out_XX functions
@@ -102,7 +102,7 @@ static void spider_io_flush(const volatile void __iomem *addr)
                vaddr = (unsigned long)PCI_FIX_ADDR(addr);
 
                /* Check if it's in allowed range for  PIO */
-               if (vaddr < PHBS_IO_BASE || vaddr >= IMALLOC_BASE)
+               if (vaddr < PHB_IO_BASE || vaddr > PHB_IO_END)
                        return;
 
                /* Try to find a PTE. If not, clear the paddr, we'll do
@@ -238,7 +238,7 @@ static void __init spider_pci_setup_chip(struct spider_pci_bus *bus)
 static void __init spider_pci_add_one(struct pci_controller *phb)
 {
        struct spider_pci_bus *bus = &spider_pci_busses[spider_pci_count];
-       struct device_node *np = phb->arch_data;
+       struct device_node *np = phb->dn;
        struct resource rsrc;
        void __iomem *regs;
 
@@ -309,15 +309,12 @@ static int __init spider_pci_workaround_init(void)
 {
        struct pci_controller *phb;
 
-       if (!machine_is(cell))
-               return 0;
-
        /* Find spider bridges. We assume they have been all probed
         * in setup_arch(). If that was to change, we would need to
         * update this code to cope with dynamically added busses
         */
        list_for_each_entry(phb, &hose_list, list_node) {
-               struct device_node *np = phb->arch_data;
+               struct device_node *np = phb->dn;
                const char *model = of_get_property(np, "model", NULL);
 
                /* If no model property or name isn't exactly "pci", skip */
@@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void)
 
        return 0;
 }
-arch_initcall(spider_pci_workaround_init);
+machine_arch_initcall(cell, spider_pci_workaround_init);