提交 cd71f8f4 编写于 作者: L Linus Walleij 提交者: Russell King

ARM: 5958/1: ARM: U300: fix inverted clk round rate

The clk_round_rate() functions in the U300 clocking will always
select the lowest clocking frequency due to inverted rounding
comparisons. Fix this.
Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 fcfadcaa
...@@ -610,34 +610,34 @@ EXPORT_SYMBOL(clk_get_rate); ...@@ -610,34 +610,34 @@ EXPORT_SYMBOL(clk_get_rate);
static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate) static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate)
{ {
if (rate >= 18900000) if (rate <= 18900000)
return 18900000; return 18900000;
if (rate >= 20800000) if (rate <= 20800000)
return 20800000; return 20800000;
if (rate >= 23100000) if (rate <= 23100000)
return 23100000; return 23100000;
if (rate >= 26000000) if (rate <= 26000000)
return 26000000; return 26000000;
if (rate >= 29700000) if (rate <= 29700000)
return 29700000; return 29700000;
if (rate >= 34700000) if (rate <= 34700000)
return 34700000; return 34700000;
if (rate >= 41600000) if (rate <= 41600000)
return 41600000; return 41600000;
if (rate >= 52000000) if (rate <= 52000000)
return 52000000; return 52000000;
return -EINVAL; return -EINVAL;
} }
static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate)
{ {
if (rate >= 13000000) if (rate <= 13000000)
return 13000000; return 13000000;
if (rate >= 52000000) if (rate <= 52000000)
return 52000000; return 52000000;
if (rate >= 104000000) if (rate <= 104000000)
return 104000000; return 104000000;
if (rate >= 208000000) if (rate <= 208000000)
return 208000000; return 208000000;
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册