mirror of https://gitee.com/openkylin/linux.git
ARM: OMAP2+: io: use new clock init API
clk_init is now separated to a common function which gets called for all SoC:s, which initializes the DT clocks and calls the SoC specific clock init. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
This commit is contained in:
parent
943a63a41f
commit
cfa9667d4a
|
@ -305,7 +305,7 @@ struct omap_hwmod;
|
|||
extern int omap_dss_reset(struct omap_hwmod *);
|
||||
|
||||
/* SoC specific clock initializer */
|
||||
extern int (*omap_clk_init)(void);
|
||||
int omap_clk_init(void);
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
|
||||
|
|
|
@ -55,10 +55,10 @@
|
|||
#include "prm44xx.h"
|
||||
|
||||
/*
|
||||
* omap_clk_init: points to a function that does the SoC-specific
|
||||
* omap_clk_soc_init: points to a function that does the SoC-specific
|
||||
* clock initializations
|
||||
*/
|
||||
int (*omap_clk_init)(void);
|
||||
static int (*omap_clk_soc_init)(void);
|
||||
|
||||
/*
|
||||
* The machine specific code may provide the extra mapping besides the
|
||||
|
@ -419,7 +419,7 @@ void __init omap2420_init_early(void)
|
|||
omap242x_clockdomains_init();
|
||||
omap2420_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = omap2420_clk_init;
|
||||
omap_clk_soc_init = omap2420_clk_init;
|
||||
}
|
||||
|
||||
void __init omap2420_init_late(void)
|
||||
|
@ -448,7 +448,7 @@ void __init omap2430_init_early(void)
|
|||
omap243x_clockdomains_init();
|
||||
omap2430_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = omap2430_clk_init;
|
||||
omap_clk_soc_init = omap2430_clk_init;
|
||||
}
|
||||
|
||||
void __init omap2430_init_late(void)
|
||||
|
@ -482,7 +482,7 @@ void __init omap3_init_early(void)
|
|||
omap3xxx_clockdomains_init();
|
||||
omap3xxx_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = omap3xxx_clk_init;
|
||||
omap_clk_soc_init = omap3xxx_clk_init;
|
||||
}
|
||||
|
||||
void __init omap3430_init_early(void)
|
||||
|
@ -520,7 +520,7 @@ void __init ti81xx_init_early(void)
|
|||
omap3xxx_clockdomains_init();
|
||||
omap3xxx_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = omap3xxx_clk_init;
|
||||
omap_clk_soc_init = omap3xxx_clk_init;
|
||||
}
|
||||
|
||||
void __init omap3_init_late(void)
|
||||
|
@ -581,7 +581,7 @@ void __init am33xx_init_early(void)
|
|||
am33xx_clockdomains_init();
|
||||
am33xx_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = am33xx_clk_init;
|
||||
omap_clk_soc_init = am33xx_clk_init;
|
||||
}
|
||||
|
||||
void __init am33xx_init_late(void)
|
||||
|
@ -635,7 +635,7 @@ void __init omap4430_init_early(void)
|
|||
omap44xx_clockdomains_init();
|
||||
omap44xx_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = omap4xxx_clk_init;
|
||||
omap_clk_soc_init = omap4xxx_clk_init;
|
||||
}
|
||||
|
||||
void __init omap4430_init_late(void)
|
||||
|
@ -666,7 +666,7 @@ void __init omap5_init_early(void)
|
|||
omap54xx_clockdomains_init();
|
||||
omap54xx_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = omap5xxx_dt_clk_init;
|
||||
omap_clk_soc_init = omap5xxx_dt_clk_init;
|
||||
}
|
||||
|
||||
void __init omap5_init_late(void)
|
||||
|
@ -711,3 +711,17 @@ void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
|
|||
_omap2_init_reprogram_sdrc();
|
||||
}
|
||||
}
|
||||
|
||||
int __init omap_clk_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!omap_clk_soc_init)
|
||||
return 0;
|
||||
|
||||
ret = of_prcm_init();
|
||||
if (!ret)
|
||||
ret = omap_clk_soc_init();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -570,8 +570,7 @@ static inline void __init realtime_counter_init(void)
|
|||
clksrc_nr, clksrc_src, clksrc_prop) \
|
||||
void __init omap##name##_gptimer_timer_init(void) \
|
||||
{ \
|
||||
if (omap_clk_init) \
|
||||
omap_clk_init(); \
|
||||
omap_clk_init(); \
|
||||
omap_dmtimer_init(); \
|
||||
omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
|
||||
omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src, \
|
||||
|
@ -582,8 +581,7 @@ void __init omap##name##_gptimer_timer_init(void) \
|
|||
clksrc_nr, clksrc_src, clksrc_prop) \
|
||||
void __init omap##name##_sync32k_timer_init(void) \
|
||||
{ \
|
||||
if (omap_clk_init) \
|
||||
omap_clk_init(); \
|
||||
omap_clk_init(); \
|
||||
omap_dmtimer_init(); \
|
||||
omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
|
||||
/* Enable the use of clocksource="gp_timer" kernel parameter */ \
|
||||
|
|
Loading…
Reference in New Issue