diff options
| author | Tony Lindgren <tony@atomide.com> | 2012-11-30 08:40:31 -0800 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2012-11-30 08:40:31 -0800 |
| commit | 2589d056122f6dcb405d411eae872aac8cf9da1b (patch) | |
| tree | 8b2fb3a9f8205c110842c59ed42987a6f2b17e1a /arch/arm/mach-omap2/clock36xx.c | |
| parent | 42a1cc9c0ec2a00b53b4f02849dc4377b09b3b05 (diff) | |
| parent | 8b9c1ac2e11a9fb3a5a8860fb7570ff7633aa7f7 (diff) | |
| download | olio-linux-3.10-2589d056122f6dcb405d411eae872aac8cf9da1b.tar.xz olio-linux-3.10-2589d056122f6dcb405d411eae872aac8cf9da1b.zip | |
Merge tag 'tags/omap-for-v3.8/devel-prcm-signed' into omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3
omap prcm changes via Paul Walmsley <paul@pwsan.com>:
Some miscellaneous OMAP hwmod changes for 3.8, along with a PRM
change needed for one of the hwmod patches to function.
Basic test logs for this branch on top of Tony's
omap-for-v3.8/clock branch at commit
558a0780b0a04862a678f7823215424b4e5501f9 are here:
http://www.pwsan.com/omap/testlogs/hwmod_devel_a_3.8/20121121161522/
However, omap-for-v3.8/clock at 558a0780 does not include some fixes
that are needed for a successful test. With several reverts,
fixes, and workarounds applied, the following test logs were
obtained:
http://www.pwsan.com/omap/testlogs/TEST_hwmod_devel_a_3.8/20121121162719/
which indicate that the series tests cleanly.
Conflicts:
arch/arm/mach-omap2/cm33xx.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/prm_common.c
Diffstat (limited to 'arch/arm/mach-omap2/clock36xx.c')
| -rw-r--r-- | arch/arm/mach-omap2/clock36xx.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/clock36xx.c b/arch/arm/mach-omap2/clock36xx.c index 0e1e9e4e2fa..8f3bf4e5090 100644 --- a/arch/arm/mach-omap2/clock36xx.c +++ b/arch/arm/mach-omap2/clock36xx.c @@ -37,34 +37,32 @@ * (Any other value different from the Read value) to the * corresponding CM_CLKSEL register will refresh the dividers. */ -static int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk *clk) +int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk) { + struct clk_hw_omap *parent; + struct clk_hw *parent_hw; u32 dummy_v, orig_v, clksel_shift; int ret; /* Clear PWRDN bit of HSDIVIDER */ ret = omap2_dflt_clk_enable(clk); + parent_hw = __clk_get_hw(__clk_get_parent(clk->clk)); + parent = to_clk_hw_omap(parent_hw); + /* Restore the dividers */ if (!ret) { - clksel_shift = __ffs(clk->parent->clksel_mask); - orig_v = __raw_readl(clk->parent->clksel_reg); + clksel_shift = __ffs(parent->clksel_mask); + orig_v = __raw_readl(parent->clksel_reg); dummy_v = orig_v; /* Write any other value different from the Read value */ dummy_v ^= (1 << clksel_shift); - __raw_writel(dummy_v, clk->parent->clksel_reg); + __raw_writel(dummy_v, parent->clksel_reg); /* Write the original divider */ - __raw_writel(orig_v, clk->parent->clksel_reg); + __raw_writel(orig_v, parent->clksel_reg); } return ret; } - -const struct clkops clkops_omap36xx_pwrdn_with_hsdiv_wait_restore = { - .enable = omap36xx_pwrdn_clk_enable_with_hsdiv_restore, - .disable = omap2_dflt_clk_disable, - .find_companion = omap2_clk_dflt_find_companion, - .find_idlest = omap2_clk_dflt_find_idlest, -}; |