summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/cbe_thermal.c
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2006-11-23 00:46:49 +0100
committerPaul Mackerras <paulus@samba.org>2006-12-04 20:40:39 +1100
commite28b003136b5b2f10c25b49c32df9b7742550c23 (patch)
tree86d629c9dc08567c5431b07883c1e860da550df7 /arch/powerpc/platforms/cell/cbe_thermal.c
parente34226d2cd443a67f46fc531e3a6bc6e03843ce2 (diff)
[POWERPC] cell: abstract spu management routines
This adds a platform specific spu management abstraction and the coresponding routines to support the IBM Cell Blade. It also removes the hypervisor only resources that were included in struct spu. Three new platform specific routines are introduced, spu_enumerate_spus(), spu_create_spu() and spu_destroy_spu(). The underlying design uses a new type, struct spu_management_ops, to hold function pointers that the platform setup code is expected to initialize to instances appropriate to that platform. For the IBM Cell Blade support, I put the hypervisor only resources that were in struct spu into a platform specific data structure struct spu_pdata. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/cell/cbe_thermal.c')
-rw-r--r--arch/powerpc/platforms/cell/cbe_thermal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c
index 17831a92d91e..616a0a3fd0e2 100644
--- a/arch/powerpc/platforms/cell/cbe_thermal.c
+++ b/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -29,6 +29,7 @@
#include <asm/prom.h>
#include "cbe_regs.h"
+#include "spu_priv1_mmio.h"
static struct cbe_pmd_regs __iomem *get_pmd_regs(struct sys_device *sysdev)
{
@@ -36,7 +37,7 @@ static struct cbe_pmd_regs __iomem *get_pmd_regs(struct sys_device *sysdev)
spu = container_of(sysdev, struct spu, sysdev);
- return cbe_get_pmd_regs(spu->devnode);
+ return cbe_get_pmd_regs(spu_devnode(spu));
}
/* returns the value for a given spu in a given register */
@@ -49,7 +50,7 @@ static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iom
/* 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 = (unsigned int *)get_property(spu->devnode, "reg", NULL);
+ id = (unsigned int *)get_property(spu_devnode(spu), "reg", NULL);
value.val = in_be64(&reg->val);
return value.spe[*id];