Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184799
b: refs/heads/master
c: a7e069f
h: refs/heads/master
i:
  184797: ad5bdd8
  184795: 8070472
  184791: 58c928d
  184783: eac3238
  184767: b57ce44
v: v3
  • Loading branch information
Mike Turquette authored and Paul Walmsley committed Feb 24, 2010
1 parent 960be49 commit d7ea1fc
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c23a97d377077c67e01f7526de3a411b316ee4f6
refs/heads/master: a7e069fc5a560c096a2597d7be27f45fb4a01df7
43 changes: 43 additions & 0 deletions trunk/arch/arm/mach-omap2/clock34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,49 @@ const struct clkops clkops_omap3430es2_hsotgusb_wait = {
.find_companion = omap2_clk_dflt_find_companion,
};

/**
* omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering
* from HSDivider PWRDN problem Implements Errata ID: i556.
* @clk: DPLL output struct clk
*
* 3630 only: dpll3_m3_ck, dpll4_m2_ck, dpll4_m3_ck, dpll4_m4_ck,
* dpll4_m5_ck & dpll4_m6_ck dividers gets loaded with reset
* valueafter their respective PWRDN bits are set. Any dummy write
* (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)
{
u32 dummy_v, orig_v, clksel_shift;
int ret;

/* Clear PWRDN bit of HSDIVIDER */
ret = omap2_dflt_clk_enable(clk);

/* Restore the dividers */
if (!ret) {
clksel_shift = __ffs(clk->parent->clksel_mask);
orig_v = __raw_readl(clk->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);

/* Write the original divider */
__raw_writel(orig_v, clk->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,
};

const struct clkops omap3_clkops_noncore_dpll_ops = {
.enable = omap3_noncore_dpll_enable,
.disable = omap3_noncore_dpll_disable,
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-omap2/clock34xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ extern const struct clkops omap3_clkops_noncore_dpll_ops;
extern const struct clkops clkops_am35xx_ipss_module_wait;
extern const struct clkops clkops_am35xx_ipss_wait;

/* OMAP36xx-specific clkops */
extern const struct clkops clkops_omap36xx_pwrdn_with_hsdiv_wait_restore;

#endif
19 changes: 19 additions & 0 deletions trunk/arch/arm/mach-omap2/clock34xx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3358,6 +3358,25 @@ int __init omap3xxx_clk_init(void)
}
}

if (cpu_is_omap3630()) {
/*
* For 3630: override clkops_omap2_dflt_wait for the
* clocks affected from PWRDN reset Limitation
*/
dpll3_m3x2_ck.ops =
&clkops_omap36xx_pwrdn_with_hsdiv_wait_restore;
dpll4_m2x2_ck.ops =
&clkops_omap36xx_pwrdn_with_hsdiv_wait_restore;
dpll4_m3x2_ck.ops =
&clkops_omap36xx_pwrdn_with_hsdiv_wait_restore;
dpll4_m4x2_ck.ops =
&clkops_omap36xx_pwrdn_with_hsdiv_wait_restore;
dpll4_m5x2_ck.ops =
&clkops_omap36xx_pwrdn_with_hsdiv_wait_restore;
dpll4_m6x2_ck.ops =
&clkops_omap36xx_pwrdn_with_hsdiv_wait_restore;
}

clk_init(&omap2_clk_functions);

for (c = omap3xxx_clks; c < omap3xxx_clks + ARRAY_SIZE(omap3xxx_clks); c++)
Expand Down

0 comments on commit d7ea1fc

Please sign in to comment.