From 6d466d31ff9f351b41856644373d90e940ca75fc Mon Sep 17 00:00:00 2001 From: Christian Krafft Date: Thu, 30 Aug 2007 01:33:53 +0200 Subject: [PATCH] --- yaml --- r: 64560 b: refs/heads/master c: aac2e68481681a362ab6f44fc515034e2a4c7f2c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/cell/spu_manage.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 41b49f46b459..f10119d48b12 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5cc44e086d7a4e20035997ec612678ca91f426e7 +refs/heads/master: aac2e68481681a362ab6f44fc515034e2a4c7f2c diff --git a/trunk/arch/powerpc/platforms/cell/spu_manage.c b/trunk/arch/powerpc/platforms/cell/spu_manage.c index 7c0668a9dcc7..0e14f532500e 100644 --- a/trunk/arch/powerpc/platforms/cell/spu_manage.c +++ b/trunk/arch/powerpc/platforms/cell/spu_manage.c @@ -48,10 +48,18 @@ static u64 __init find_spu_unit_number(struct device_node *spe) { const unsigned int *prop; int proplen; + + /* new device trees should provide the physical-id attribute */ prop = of_get_property(spe, "physical-id", &proplen); if (proplen == 4) return (u64)*prop; + /* celleb device tree provides the unit-id */ + prop = of_get_property(spe, "unit-id", &proplen); + if (proplen == 4) + return (u64)*prop; + + /* legacy device trees provide the id in the reg attribute */ prop = of_get_property(spe, "reg", &proplen); if (proplen == 4) return (u64)*prop;