Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62233
b: refs/heads/master
c: 827e364
h: refs/heads/master
i:
  62231: 5dc883d
v: v3
  • Loading branch information
Jean-Christophe DUBOIS authored and Arnd Bergmann committed Jul 20, 2007
1 parent c747031 commit 159b2a8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64bafa9db7e92d5a46402613188b71800924ca1f
refs/heads/master: 827e3648dc2c31e01db7cd2e4498061cf78a97a9
25 changes: 20 additions & 5 deletions trunk/arch/powerpc/platforms/cell/cbe_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static struct attribute_group ppe_attribute_group = {
/*
* initialize throttling with default values
*/
static void __init init_default_values(void)
static int __init init_default_values(void)
{
int cpu;
struct cbe_pmd_regs __iomem *pmd_regs;
Expand Down Expand Up @@ -339,25 +339,40 @@ static void __init init_default_values(void)
for_each_possible_cpu (cpu) {
pr_debug("processing cpu %d\n", cpu);
sysdev = get_cpu_sysdev(cpu);

if (!sysdev) {
pr_info("invalid sysdev pointer for cbe_thermal\n");
return -EINVAL;
}

pmd_regs = cbe_get_cpu_pmd_regs(sysdev->id);

if (!pmd_regs) {
pr_info("invalid CBE regs pointer for cbe_thermal\n");
return -EINVAL;
}

out_be64(&pmd_regs->tm_str2, str2);
out_be64(&pmd_regs->tm_str1.val, str1.val);
out_be64(&pmd_regs->tm_tpr.val, tpr.val);
out_be64(&pmd_regs->tm_cr1.val, cr1.val);
out_be64(&pmd_regs->tm_cr2, cr2);
}

return 0;
}


static int __init thermal_init(void)
{
init_default_values();
int rc = init_default_values();

spu_add_sysdev_attr_group(&spu_attribute_group);
cpu_add_sysdev_attr_group(&ppe_attribute_group);
if (rc == 0) {
spu_add_sysdev_attr_group(&spu_attribute_group);
cpu_add_sysdev_attr_group(&ppe_attribute_group);
}

return 0;
return rc;
}
module_init(thermal_init);

Expand Down

0 comments on commit 159b2a8

Please sign in to comment.