diff options
Diffstat (limited to 'arch/arm/mach-u300/clock.c')
-rw-r--r-- | arch/arm/mach-u300/clock.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index 111f7ea32b38..5af71d5ba665 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c | |||
@@ -610,34 +610,34 @@ EXPORT_SYMBOL(clk_get_rate); | |||
610 | 610 | ||
611 | static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate) | 611 | static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate) |
612 | { | 612 | { |
613 | if (rate >= 18900000) | 613 | if (rate <= 18900000) |
614 | return 18900000; | 614 | return 18900000; |
615 | if (rate >= 20800000) | 615 | if (rate <= 20800000) |
616 | return 20800000; | 616 | return 20800000; |
617 | if (rate >= 23100000) | 617 | if (rate <= 23100000) |
618 | return 23100000; | 618 | return 23100000; |
619 | if (rate >= 26000000) | 619 | if (rate <= 26000000) |
620 | return 26000000; | 620 | return 26000000; |
621 | if (rate >= 29700000) | 621 | if (rate <= 29700000) |
622 | return 29700000; | 622 | return 29700000; |
623 | if (rate >= 34700000) | 623 | if (rate <= 34700000) |
624 | return 34700000; | 624 | return 34700000; |
625 | if (rate >= 41600000) | 625 | if (rate <= 41600000) |
626 | return 41600000; | 626 | return 41600000; |
627 | if (rate >= 52000000) | 627 | if (rate <= 52000000) |
628 | return 52000000; | 628 | return 52000000; |
629 | return -EINVAL; | 629 | return -EINVAL; |
630 | } | 630 | } |
631 | 631 | ||
632 | static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) | 632 | static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) |
633 | { | 633 | { |
634 | if (rate >= 13000000) | 634 | if (rate <= 13000000) |
635 | return 13000000; | 635 | return 13000000; |
636 | if (rate >= 52000000) | 636 | if (rate <= 52000000) |
637 | return 52000000; | 637 | return 52000000; |
638 | if (rate >= 104000000) | 638 | if (rate <= 104000000) |
639 | return 104000000; | 639 | return 104000000; |
640 | if (rate >= 208000000) | 640 | if (rate <= 208000000) |
641 | return 208000000; | 641 | return 208000000; |
642 | return -EINVAL; | 642 | return -EINVAL; |
643 | } | 643 | } |
@@ -1276,11 +1276,8 @@ static struct clk_lookup lookups[] = { | |||
1276 | 1276 | ||
1277 | static void __init clk_register(void) | 1277 | static void __init clk_register(void) |
1278 | { | 1278 | { |
1279 | int i; | ||
1280 | |||
1281 | /* Register the lookups */ | 1279 | /* Register the lookups */ |
1282 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 1280 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
1283 | clkdev_add(&lookups[i]); | ||
1284 | } | 1281 | } |
1285 | 1282 | ||
1286 | /* | 1283 | /* |