diff options
author | Tony Lindgren <tony@atomide.com> | 2006-09-25 12:41:20 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2006-09-25 12:41:20 +0300 |
commit | ae78dcf79aefa98a1ed245898467eb6d3bfc11e6 (patch) | |
tree | 9aa69ece663dd5c8ed4ec5ec1cb776be04ec25b6 /arch/arm/mach-omap2/clock.c | |
parent | 7c250413e5b7c3dfae89354725b70c76d7621395 (diff) |
ARM: OMAP: Avoid sleeping during arch_reset
If we call clk_get() from arch_reset we get ugly messages before
reboot.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index d1b648a4efb..3d0792e0366 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -36,6 +36,8 @@ static struct prcm_config *curr_prcm_set; static u32 curr_perf_level = PRCM_FULL_SPEED; +static struct clk *vclk; +static struct clk *sclk; /*------------------------------------------------------------------------- * Omap2 specific clock functions @@ -984,6 +986,20 @@ static void __init omap2_get_crystal_rate(struct clk *osc, struct clk *sys) sys->rate = sclk; } +/* + * Set clocks for bypass mode for reboot to work. + */ +void omap2_clk_prepare_for_reboot(void) +{ + u32 rate; + + if (vclk == NULL || sclk == NULL) + return; + + rate = clk_get_rate(sclk); + clk_set_rate(vclk, rate); +} + #ifdef CONFIG_OMAP_RESET_CLOCKS static void __init omap2_disable_unused_clocks(void) { @@ -1080,5 +1096,9 @@ int __init omap2_clk_init(void) if (cpu_is_omap2430()) clk_enable(&sdrc_ick); + /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */ + vclk = clk_get(NULL, "virt_prcm_set"); + sclk = clk_get(NULL, "sys_ck"); + return 0; } |