Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64560
b: refs/heads/master
c: aac2e68
h: refs/heads/master
v: v3
  • Loading branch information
Christian Krafft authored and Arnd Bergmann committed Aug 29, 2007
1 parent fc23274 commit 6d466d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5cc44e086d7a4e20035997ec612678ca91f426e7
refs/heads/master: aac2e68481681a362ab6f44fc515034e2a4c7f2c
8 changes: 8 additions & 0 deletions trunk/arch/powerpc/platforms/cell/spu_manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6d466d3

Please sign in to comment.