[FYI/PATCH 2/3] fix IIC device tree interpretation for Cell

Utz Bacher utz.bacher at de.ibm.com
Tue Feb 14 07:36:25 EST 2006


This patch applies on top of Arnd's posting (patch id 4188) from 1/18 (on
top of 2.6.15.4).
It fixes the Linux interpretation of the Cell SLOF deivce tree IIC target
IDs and is recommended for running on a Cell blade today.

Cc: Jens Osterkamp <Jens.Osterkamp at de.ibm.com>
Cc: Arnd Bergmann <arndb at de.ibm.com>
From: Gerhard Stenzel <gerhard.stenzel at de.ibm.com>
Signed-off-by: Utz Bacher <utz.bacher at de.ibm.com>

Index: linux-2.6.15.4/arch/powerpc/platforms/cell/interrupt.c
===================================================================
--- linux-2.6.15.4.orig/arch/powerpc/platforms/cell/interrupt.c
+++ linux-2.6.15.4/arch/powerpc/platforms/cell/interrupt.c
@@ -254,13 +254,13 @@
                 iic = &per_cpu(iic, np[0]);
                 iic->regs = __ioremap(regs[0], sizeof(struct iic_regs),
                                       _PAGE_NO_CACHE);
-               iic->target_id = (np[0] << 4) + 0xe;
+               iic->target_id = ((np[0] & 2) << 3) + ((np[0] & 1) ? 0xf : 0xe);
                 printk("IIC for CPU %d at %lx mapped to %p\n", np[0], regs[0], iic->regs);

                 iic = &per_cpu(iic, np[1]);
                 iic->regs = __ioremap(regs[2], sizeof(struct iic_regs),
                                       _PAGE_NO_CACHE);
-               iic->target_id = (np[1] << 3) + 0xe;
+               iic->target_id = ((np[1] & 2) << 3) + ((np[1] & 1) ? 0xf : 0xe);
                 printk("IIC for CPU %d at %lx mapped to %p\n", np[1], regs[2], iic->regs);

                 found++;



More information about the Linuxppc64-dev mailing list