]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/sysdev/indirect_pci.c
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / arch / powerpc / sysdev / indirect_pci.c
index 5294560c7b00b5d65876995e8a96c10d047e3b08..7fd49c97501aa965058a12d9b62f484fdde0cc56 100644 (file)
@@ -123,6 +123,12 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
                        (bus->number == hose->first_busno))
                val &= 0xffffff00;
 
+       /* Workaround for PCI_28 Errata in 440EPx/GRx */
+       if ((hose->indirect_type & PPC_INDIRECT_TYPE_BROKEN_MRM) &&
+                       offset == PCI_CACHE_LINE_SIZE) {
+               val = 0;
+       }
+
        /*
         * Note: the caller has already checked that offset is
         * suitably aligned and that len is 1, 2 or 4.
@@ -144,14 +150,16 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
 
 static struct pci_ops indirect_pci_ops =
 {
-       indirect_read_config,
-       indirect_write_config
+       .read = indirect_read_config,
+       .write = indirect_write_config,
 };
 
 void __init
-setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data, u32 flags)
+setup_indirect_pci(struct pci_controller* hose,
+                  resource_size_t cfg_addr,
+                  resource_size_t cfg_data, u32 flags)
 {
-       unsigned long base = cfg_addr & PAGE_MASK;
+       resource_size_t base = cfg_addr & PAGE_MASK;
        void __iomem *mbase;
 
        mbase = ioremap(base, PAGE_SIZE);