[Cbe-oss-dev] [PATCH] arch/powerpc/platforms/cell/spider-pci.c: fix wrong spider base for QS20

Dominik Klein dominik.klein at gmx.com
Sat Oct 22 02:23:03 EST 2011


Commit 7cfb62a2e820b6032c08835dbd996d8518af14a3 restructured the PCI 
workarounds for Spider. One line of code which works around an error in the 
QS20 device tree apparently went missing in the process. Without it, kernels 
will crash on QS20 if there are InfiniBand cards installed in the PCIe slots.

This patch re-introduces this workaround and guards it by a model check so
that Celleb won't be affected.

Signed-off-by: Dominik Klein <dominik.klein at gmx.com>
---
 spider-pci.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/arch/powerpc/platforms/cell/spider-pci.c
+++ b/arch/powerpc/platforms/cell/spider-pci.c
@@ -129,6 +129,7 @@
 	struct device_node *np = bus->phb->dn;
 	struct resource r;
 	unsigned long offset = (unsigned long)data;
+	long dt_root = of_get_flat_dt_root();
 
 	pr_debug("SPIDERPCI-IOWA:Bus initialize for spider(%s)\n",
 		 np->full_name);
@@ -145,6 +146,15 @@
 		goto error;
 	}
 
+	/* If we're running on QS20 mask out some bits to get the base of the
+	 * spider chip. This seems to be an error in the QS20 device tree.
+	 */
+	if (of_flat_dt_is_compatible(dt_root, "IBM,CPBW-1.0")) {
+		pr_debug("SPIDERPCI-IOWA:"
+			"We're running on QS20 - fixing the spider base.\n");
+		r.start &= ~0xfffffffful;
+	}
+
 	regs = ioremap(r.start + offset, SPIDER_PCI_REG_SIZE);
 	if (!regs) {
 		pr_err("SPIDERPCI-IOWA:ioremap failed.\n");


More information about the cbe-oss-dev mailing list