diff options
Diffstat (limited to 'arch/arm/mach-vexpress')
-rw-r--r-- | arch/arm/mach-vexpress/dcscb.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/spc.c | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c index 788495d35cf9..30b993399ed7 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c | |||
@@ -51,12 +51,14 @@ static int dcscb_allcpus_mask[2]; | |||
51 | static int dcscb_power_up(unsigned int cpu, unsigned int cluster) | 51 | static int dcscb_power_up(unsigned int cpu, unsigned int cluster) |
52 | { | 52 | { |
53 | unsigned int rst_hold, cpumask = (1 << cpu); | 53 | unsigned int rst_hold, cpumask = (1 << cpu); |
54 | unsigned int all_mask = dcscb_allcpus_mask[cluster]; | 54 | unsigned int all_mask; |
55 | 55 | ||
56 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | 56 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); |
57 | if (cpu >= 4 || cluster >= 2) | 57 | if (cpu >= 4 || cluster >= 2) |
58 | return -EINVAL; | 58 | return -EINVAL; |
59 | 59 | ||
60 | all_mask = dcscb_allcpus_mask[cluster]; | ||
61 | |||
60 | /* | 62 | /* |
61 | * Since this is called with IRQs enabled, and no arch_spin_lock_irq | 63 | * Since this is called with IRQs enabled, and no arch_spin_lock_irq |
62 | * variant exists, we need to disable IRQs manually here. | 64 | * variant exists, we need to disable IRQs manually here. |
@@ -101,11 +103,12 @@ static void dcscb_power_down(void) | |||
101 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | 103 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); |
102 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | 104 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); |
103 | cpumask = (1 << cpu); | 105 | cpumask = (1 << cpu); |
104 | all_mask = dcscb_allcpus_mask[cluster]; | ||
105 | 106 | ||
106 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | 107 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); |
107 | BUG_ON(cpu >= 4 || cluster >= 2); | 108 | BUG_ON(cpu >= 4 || cluster >= 2); |
108 | 109 | ||
110 | all_mask = dcscb_allcpus_mask[cluster]; | ||
111 | |||
109 | __mcpm_cpu_going_down(cpu, cluster); | 112 | __mcpm_cpu_going_down(cpu, cluster); |
110 | 113 | ||
111 | arch_spin_lock(&dcscb_lock); | 114 | arch_spin_lock(&dcscb_lock); |
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index c26ef5b92ca7..2c2754e79cb3 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c | |||
@@ -392,7 +392,7 @@ static irqreturn_t ve_spc_irq_handler(int irq, void *data) | |||
392 | * +--------------------------+ | 392 | * +--------------------------+ |
393 | * | 31 20 | 19 0 | | 393 | * | 31 20 | 19 0 | |
394 | * +--------------------------+ | 394 | * +--------------------------+ |
395 | * | u_volt | freq(kHz) | | 395 | * | m_volt | freq(kHz) | |
396 | * +--------------------------+ | 396 | * +--------------------------+ |
397 | */ | 397 | */ |
398 | #define MULT_FACTOR 20 | 398 | #define MULT_FACTOR 20 |
@@ -414,7 +414,7 @@ static int ve_spc_populate_opps(uint32_t cluster) | |||
414 | ret = ve_spc_read_sys_cfg(SYSCFG_SCC, off, &data); | 414 | ret = ve_spc_read_sys_cfg(SYSCFG_SCC, off, &data); |
415 | if (!ret) { | 415 | if (!ret) { |
416 | opps->freq = (data & FREQ_MASK) * MULT_FACTOR; | 416 | opps->freq = (data & FREQ_MASK) * MULT_FACTOR; |
417 | opps->u_volt = data >> VOLT_SHIFT; | 417 | opps->u_volt = (data >> VOLT_SHIFT) * 1000; |
418 | } else { | 418 | } else { |
419 | break; | 419 | break; |
420 | } | 420 | } |