diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spu_manage.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 7c0668a9dcc7..0e14f532500e 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -48,10 +48,18 @@ static u64 __init find_spu_unit_number(struct device_node *spe) | |||
48 | { | 48 | { |
49 | const unsigned int *prop; | 49 | const unsigned int *prop; |
50 | int proplen; | 50 | int proplen; |
51 | |||
52 | /* new device trees should provide the physical-id attribute */ | ||
51 | prop = of_get_property(spe, "physical-id", &proplen); | 53 | prop = of_get_property(spe, "physical-id", &proplen); |
52 | if (proplen == 4) | 54 | if (proplen == 4) |
53 | return (u64)*prop; | 55 | return (u64)*prop; |
54 | 56 | ||
57 | /* celleb device tree provides the unit-id */ | ||
58 | prop = of_get_property(spe, "unit-id", &proplen); | ||
59 | if (proplen == 4) | ||
60 | return (u64)*prop; | ||
61 | |||
62 | /* legacy device trees provide the id in the reg attribute */ | ||
55 | prop = of_get_property(spe, "reg", &proplen); | 63 | prop = of_get_property(spe, "reg", &proplen); |
56 | if (proplen == 4) | 64 | if (proplen == 4) |
57 | return (u64)*prop; | 65 | return (u64)*prop; |