Subject: Cell: add register access based on SPU device_nodes Signed-off-by: Christian Krafft Index: linus-2.6/arch/powerpc/platforms/cell/cbe_regs.c =================================================================== --- linus-2.6.orig/arch/powerpc/platforms/cell/cbe_regs.c +++ linus-2.6/arch/powerpc/platforms/cell/cbe_regs.c @@ -43,6 +43,19 @@ static struct cbe_thread_map static struct cbe_regs_map *cbe_find_map(struct device_node *np) { int i; + struct device_node *tmp_np; + + if (strcasecmp(np->type, "spe") == 0) { + if (np->data == NULL) { + /* walk up path until cpu node was found */ + tmp_np = np->parent; + while (tmp_np != NULL && strcasecmp(tmp_np->type, "cpu") != 0) + tmp_np = tmp_np->parent; + + np->data = cbe_find_map(tmp_np); + } + return np->data; + } for (i = 0; i < cbe_regs_map_count; i++) if (cbe_regs_maps[i].cpu_node == np)