diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index f6a13451d1fd..6031e179926b 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -81,7 +81,7 @@ static inline void __init ldp_init_smc911x(void) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | ldp_smc911x_resources[0].start = cs_mem_base + 0x0; | 83 | ldp_smc911x_resources[0].start = cs_mem_base + 0x0; |
84 | ldp_smc911x_resources[0].end = cs_mem_base + 0xf; | 84 | ldp_smc911x_resources[0].end = cs_mem_base + 0xff; |
85 | udelay(100); | 85 | udelay(100); |
86 | 86 | ||
87 | eth_gpio = LDP_SMC911X_GPIO; | 87 | eth_gpio = LDP_SMC911X_GPIO; |
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index ad721e0cbf7a..ce4d46a4a838 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -565,7 +565,7 @@ u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val) | |||
565 | * | 565 | * |
566 | * Given a struct clk of a rate-selectable clksel clock, and a clock divisor, | 566 | * Given a struct clk of a rate-selectable clksel clock, and a clock divisor, |
567 | * find the corresponding register field value. The return register value is | 567 | * find the corresponding register field value. The return register value is |
568 | * the value before left-shifting. Returns 0xffffffff on error | 568 | * the value before left-shifting. Returns ~0 on error |
569 | */ | 569 | */ |
570 | u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | 570 | u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) |
571 | { | 571 | { |
@@ -577,7 +577,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | |||
577 | 577 | ||
578 | clks = omap2_get_clksel_by_parent(clk, clk->parent); | 578 | clks = omap2_get_clksel_by_parent(clk, clk->parent); |
579 | if (clks == NULL) | 579 | if (clks == NULL) |
580 | return 0; | 580 | return ~0; |
581 | 581 | ||
582 | for (clkr = clks->rates; clkr->div; clkr++) { | 582 | for (clkr = clks->rates; clkr->div; clkr++) { |
583 | if ((clkr->flags & cpu_mask) && (clkr->div == div)) | 583 | if ((clkr->flags & cpu_mask) && (clkr->div == div)) |
@@ -588,7 +588,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | |||
588 | printk(KERN_ERR "clock: Could not find divisor %d for " | 588 | printk(KERN_ERR "clock: Could not find divisor %d for " |
589 | "clock %s parent %s\n", div, clk->name, | 589 | "clock %s parent %s\n", div, clk->name, |
590 | clk->parent->name); | 590 | clk->parent->name); |
591 | return 0; | 591 | return ~0; |
592 | } | 592 | } |
593 | 593 | ||
594 | return clkr->val; | 594 | return clkr->val; |
@@ -708,7 +708,7 @@ static u32 omap2_clksel_get_src_field(void __iomem **src_addr, | |||
708 | return 0; | 708 | return 0; |
709 | 709 | ||
710 | for (clkr = clks->rates; clkr->div; clkr++) { | 710 | for (clkr = clks->rates; clkr->div; clkr++) { |
711 | if (clkr->flags & (cpu_mask | DEFAULT_RATE)) | 711 | if (clkr->flags & cpu_mask && clkr->flags & DEFAULT_RATE) |
712 | break; /* Found the default rate for this platform */ | 712 | break; /* Found the default rate for this platform */ |
713 | } | 713 | } |
714 | 714 | ||
@@ -746,7 +746,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | |||
746 | return -EINVAL; | 746 | return -EINVAL; |
747 | 747 | ||
748 | if (clk->usecount > 0) | 748 | if (clk->usecount > 0) |
749 | _omap2_clk_disable(clk); | 749 | omap2_clk_disable(clk); |
750 | 750 | ||
751 | /* Set new source value (previous dividers if any in effect) */ | 751 | /* Set new source value (previous dividers if any in effect) */ |
752 | reg_val = __raw_readl(src_addr) & ~field_mask; | 752 | reg_val = __raw_readl(src_addr) & ~field_mask; |
@@ -759,11 +759,11 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | |||
759 | wmb(); | 759 | wmb(); |
760 | } | 760 | } |
761 | 761 | ||
762 | if (clk->usecount > 0) | ||
763 | _omap2_clk_enable(clk); | ||
764 | |||
765 | clk->parent = new_parent; | 762 | clk->parent = new_parent; |
766 | 763 | ||
764 | if (clk->usecount > 0) | ||
765 | omap2_clk_enable(clk); | ||
766 | |||
767 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ | 767 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ |
768 | clk->rate = new_parent->rate; | 768 | clk->rate = new_parent->rate; |
769 | 769 | ||