aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJean-Christophe DUBOIS <jcd@tribudubois.net>2007-07-20 15:39:25 -0400
committerArnd Bergmann <arnd@klappe.arndb.de>2007-07-20 15:41:41 -0400
commitb86ce01c7700cfc74665799355a46dcadf920ebd (patch)
treefb7e196c413aa3902b398135daff2b8486aa58ac /arch
parent827e3648dc2c31e01db7cd2e4498061cf78a97a9 (diff)
[CELL] allow linux to map Cell regs on legacy SLOF tree.
The platforms missing the "cpus" property in the "be" node are mono-Cell platforms such as CAB or Getaway. Therefore it is possible to assume that if there is no "cpus" properties under the "be" node then we can safely return the "device node" without more checking. This is a bit hacky but ... it allows it to work on these platforms. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Acked-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/cell/cbe_regs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c
index 12c9674b4b1f..c8f7f0007422 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.c
+++ b/arch/powerpc/platforms/cell/cbe_regs.c
@@ -174,6 +174,13 @@ static struct device_node *cbe_get_be_node(int cpu_id)
174 174
175 cpu_handle = of_get_property(np, "cpus", &len); 175 cpu_handle = of_get_property(np, "cpus", &len);
176 176
177 /*
178 * the CAB SLOF tree is non compliant, so we just assume
179 * there is only one node
180 */
181 if (WARN_ON_ONCE(!cpu_handle))
182 return np;
183
177 for (i=0; i<len; i++) 184 for (i=0; i<len; i++)
178 if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL)) 185 if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL))
179 return np; 186 return np;