Commit f356a0b5 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Reset more bootloader clocks during early init

Added omap_searly_clk_reset() that gets called before clocks
are initialized. Another round of bootloader clock resets
is still done after module inits are done.
parent e1c4056f
......@@ -1125,7 +1125,18 @@ void clk_unregister(struct clk *clk)
}
EXPORT_SYMBOL(clk_unregister);
#ifdef CONFIG_OMAP_RESET_CLOCKS
/*
* Resets some clocks that may be left on from bootloader,
* but leaves serial clocks on. See also omap_late_clk_reset().
*/
static inline void omap_early_clk_reset(void)
{
omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
}
#else
#define omap_early_clk_reset() {}
#endif
int __init clk_init(void)
{
......@@ -1133,6 +1144,8 @@ int __init clk_init(void)
const struct omap_clock_config *info;
int crystal_type = 0; /* Default 12 MHz */
omap_early_clk_reset();
for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) {
if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) {
clk_register(*clkp);
......@@ -1252,7 +1265,7 @@ int __init clk_init(void)
#ifdef CONFIG_OMAP_RESET_CLOCKS
static int __init omap_clk_reset(void)
static int __init omap_late_clk_reset(void)
{
/* Turn off all unused clocks */
struct clk *p;
......@@ -1305,6 +1318,6 @@ static int __init omap_clk_reset(void)
return 0;
}
late_initcall(omap_clk_reset);
late_initcall(omap_late_clk_reset);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment