diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock36xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock36xx.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/clock36xx.c b/arch/arm/mach-omap2/clock36xx.c index 8f3bf4e50908..bbd6a3f717e6 100644 --- a/arch/arm/mach-omap2/clock36xx.c +++ b/arch/arm/mach-omap2/clock36xx.c | |||
@@ -20,11 +20,12 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/clk-provider.h> | ||
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | 25 | ||
25 | #include "clock.h" | 26 | #include "clock.h" |
26 | #include "clock36xx.h" | 27 | #include "clock36xx.h" |
27 | 28 | #define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw) | |
28 | 29 | ||
29 | /** | 30 | /** |
30 | * omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering | 31 | * omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering |
@@ -39,29 +40,28 @@ | |||
39 | */ | 40 | */ |
40 | int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk) | 41 | int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk) |
41 | { | 42 | { |
42 | struct clk_hw_omap *parent; | 43 | struct clk_divider *parent; |
43 | struct clk_hw *parent_hw; | 44 | struct clk_hw *parent_hw; |
44 | u32 dummy_v, orig_v, clksel_shift; | 45 | u32 dummy_v, orig_v; |
45 | int ret; | 46 | int ret; |
46 | 47 | ||
47 | /* Clear PWRDN bit of HSDIVIDER */ | 48 | /* Clear PWRDN bit of HSDIVIDER */ |
48 | ret = omap2_dflt_clk_enable(clk); | 49 | ret = omap2_dflt_clk_enable(clk); |
49 | 50 | ||
50 | parent_hw = __clk_get_hw(__clk_get_parent(clk->clk)); | 51 | parent_hw = __clk_get_hw(__clk_get_parent(clk->clk)); |
51 | parent = to_clk_hw_omap(parent_hw); | 52 | parent = to_clk_divider(parent_hw); |
52 | 53 | ||
53 | /* Restore the dividers */ | 54 | /* Restore the dividers */ |
54 | if (!ret) { | 55 | if (!ret) { |
55 | clksel_shift = __ffs(parent->clksel_mask); | 56 | orig_v = __raw_readl(parent->reg); |
56 | orig_v = __raw_readl(parent->clksel_reg); | ||
57 | dummy_v = orig_v; | 57 | dummy_v = orig_v; |
58 | 58 | ||
59 | /* Write any other value different from the Read value */ | 59 | /* Write any other value different from the Read value */ |
60 | dummy_v ^= (1 << clksel_shift); | 60 | dummy_v ^= (1 << parent->shift); |
61 | __raw_writel(dummy_v, parent->clksel_reg); | 61 | __raw_writel(dummy_v, parent->reg); |
62 | 62 | ||
63 | /* Write the original divider */ | 63 | /* Write the original divider */ |
64 | __raw_writel(orig_v, parent->clksel_reg); | 64 | __raw_writel(orig_v, parent->reg); |
65 | } | 65 | } |
66 | 66 | ||
67 | return ret; | 67 | return ret; |