Commit:     fa7f374bbf6d8e5fc7dd281a62498041066aaf43
Parent:     dfa70f81a05fa857fb1428ac2a88da84ecd50dd9
Author:     Christian Krafft <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 23 03:01:25 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Sat Aug 25 16:58:26 2007 +1000

    [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 <[EMAIL PROTECTED]>
    Cc: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/platforms/cell/cbe_thermal.c |    6 +-----
 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 
index e4132f8..fb5eda4 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)
 /* returns the value for a given spu in a given register */
 static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg 
__iomem *reg)
-       const unsigned int *id;
        union spe_reg value;
        struct spu *spu;
-       /* getting the id from the reg attribute will not work on future 
device-tree layouts
-        * in future we should store the id to the spu struct and use it here */
        spu = container_of(sysdev, struct spu, sysdev);
-       id = of_get_property(spu_devnode(spu), "reg", NULL);
        value.val = in_be64(&reg->val);
-       return value.spe[*id];
+       return value.spe[spu->spe_id];
 static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf)
diff --git a/arch/powerpc/platforms/cell/spu_manage.c 
index 5eb8834..7c0668a 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 
        const unsigned int *prop;
        int proplen;
-       prop = of_get_property(spe, "unit-id", &proplen);
+       prop = of_get_property(spe, "physical-id", &proplen);
        if (proplen == 4)
                return (u64)*prop;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to