diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/cbe_thermal.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_manage.c | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c index e4132f8f51b3..fb5eda48467d 100644 --- a/arch/powerpc/platforms/cell/cbe_thermal.c +++ b/arch/powerpc/platforms/cell/cbe_thermal.c | |||
@@ -88,17 +88,13 @@ static struct cbe_pmd_regs __iomem *get_pmd_regs(struct sys_device *sysdev) | |||
88 | /* returns the value for a given spu in a given register */ | 88 | /* returns the value for a given spu in a given register */ |
89 | static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg) | 89 | static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg) |
90 | { | 90 | { |
91 | const unsigned int *id; | ||
92 | union spe_reg value; | 91 | union spe_reg value; |
93 | struct spu *spu; | 92 | struct spu *spu; |
94 | 93 | ||
95 | /* getting the id from the reg attribute will not work on future device-tree layouts | ||
96 | * in future we should store the id to the spu struct and use it here */ | ||
97 | spu = container_of(sysdev, struct spu, sysdev); | 94 | spu = container_of(sysdev, struct spu, sysdev); |
98 | id = of_get_property(spu_devnode(spu), "reg", NULL); | ||
99 | value.val = in_be64(®->val); | 95 | value.val = in_be64(®->val); |
100 | 96 | ||
101 | return value.spe[*id]; | 97 | return value.spe[spu->spe_id]; |
102 | } | 98 | } |
103 | 99 | ||
104 | static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf) | 100 | static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf) |
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 5eb88346181a..7c0668a9dcc7 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -48,7 +48,7 @@ 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 | prop = of_get_property(spe, "unit-id", &proplen); | 51 | prop = of_get_property(spe, "physical-id", &proplen); |
52 | if (proplen == 4) | 52 | if (proplen == 4) |
53 | return (u64)*prop; | 53 | return (u64)*prop; |
54 | 54 | ||