[POWERPC] spu_manage: Use newer physical-id attribute

Legacy device tree used the reg property for the physical id of an
spe. On newer device tree layouts the reg property contains the
"correct" value in the reg attribute. So there has been intoduced the
"physical-id" on newer devicetree layouts. The id is stored by
spu_manage into the spu struct as spe_id. cbe_thermal has been
changed to use the spu->spe_id. There's no need for the thermal code
to check devicetree attributes for itself.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Cc: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Christian Krafft and committed by
Paul Mackerras
fa7f374b dfa70f81

+2 -6
+1 -5
arch/powerpc/platforms/cell/cbe_thermal.c
··· 88 88 /* returns the value for a given spu in a given register */ 89 89 static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg) 90 90 { 91 - const unsigned int *id; 92 91 union spe_reg value; 93 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 94 spu = container_of(sysdev, struct spu, sysdev); 98 - id = of_get_property(spu_devnode(spu), "reg", NULL); 99 95 value.val = in_be64(&reg->val); 100 96 101 - return value.spe[*id]; 97 + return value.spe[spu->spe_id]; 102 98 } 103 99 104 100 static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf)
+1 -1
arch/powerpc/platforms/cell/spu_manage.c
··· 48 48 { 49 49 const unsigned int *prop; 50 50 int proplen; 51 - prop = of_get_property(spe, "unit-id", &proplen); 51 + prop = of_get_property(spe, "physical-id", &proplen); 52 52 if (proplen == 4) 53 53 return (u64)*prop; 54 54