Skip to content

Commit

Permalink
ARM: ux500: fix the smp_twd clock calculation
Browse files Browse the repository at this point in the history
The clock for the smp_twd block is not equal to the CPU
frequency, actually it is divided by two, so fix this,
and set the initial frequency to half of 1GHz which is
the most common case.

Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Dec 18, 2011
1 parent c15def1 commit 1095843
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-ux500/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static int __init clk_debugfs_init(void)
late_initcall(clk_debugfs_init);
#endif /* defined(CONFIG_DEBUG_FS) */

unsigned long clk_smp_twd_rate = 400000000;
unsigned long clk_smp_twd_rate = 500000000;

unsigned long clk_smp_twd_get_rate(struct clk *clk)
{
Expand All @@ -677,7 +677,7 @@ static int clk_twd_cpufreq_transition(struct notifier_block *nb,

if (state == CPUFREQ_PRECHANGE) {
/* Save frequency in simple Hz */
clk_smp_twd_rate = f->new * 1000;
clk_smp_twd_rate = (f->new * 1000) / 2;
}

return NOTIFY_OK;
Expand Down

0 comments on commit 1095843

Please sign in to comment.