powerpc/4xx: Workaround for PPC440EPx/GRx PCI_28 Errata
[sfrench/cifs-2.6.git] / arch / powerpc / sysdev / indirect_pci.c
index cfbd2aae93e8a178e665242f415894b34fce3b41..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.