diff options
Diffstat (limited to 'arch/arm/mach-vexpress/spc.c')
-rw-r--r-- | arch/arm/mach-vexpress/spc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index 2c2754e79cb3..f61158c6ce71 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c | |||
@@ -426,9 +426,15 @@ static int ve_spc_populate_opps(uint32_t cluster) | |||
426 | 426 | ||
427 | static int ve_init_opp_table(struct device *cpu_dev) | 427 | static int ve_init_opp_table(struct device *cpu_dev) |
428 | { | 428 | { |
429 | int cluster = topology_physical_package_id(cpu_dev->id); | 429 | int cluster; |
430 | int idx, ret = 0, max_opp = info->num_opps[cluster]; | 430 | int idx, ret = 0, max_opp; |
431 | struct ve_spc_opp *opps = info->opps[cluster]; | 431 | struct ve_spc_opp *opps; |
432 | |||
433 | cluster = topology_physical_package_id(cpu_dev->id); | ||
434 | cluster = cluster < 0 ? 0 : cluster; | ||
435 | |||
436 | max_opp = info->num_opps[cluster]; | ||
437 | opps = info->opps[cluster]; | ||
432 | 438 | ||
433 | for (idx = 0; idx < max_opp; idx++, opps++) { | 439 | for (idx = 0; idx < max_opp; idx++, opps++) { |
434 | ret = dev_pm_opp_add(cpu_dev, opps->freq * 1000, opps->u_volt); | 440 | ret = dev_pm_opp_add(cpu_dev, opps->freq * 1000, opps->u_volt); |
@@ -537,6 +543,8 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev) | |||
537 | spc->hw.init = &init; | 543 | spc->hw.init = &init; |
538 | spc->cluster = topology_physical_package_id(cpu_dev->id); | 544 | spc->cluster = topology_physical_package_id(cpu_dev->id); |
539 | 545 | ||
546 | spc->cluster = spc->cluster < 0 ? 0 : spc->cluster; | ||
547 | |||
540 | init.name = dev_name(cpu_dev); | 548 | init.name = dev_name(cpu_dev); |
541 | init.ops = &clk_spc_ops; | 549 | init.ops = &clk_spc_ops; |
542 | init.flags = CLK_IS_ROOT | CLK_GET_RATE_NOCACHE; | 550 | init.flags = CLK_IS_ROOT | CLK_GET_RATE_NOCACHE; |