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:

committed by
Mike Turquette

parent
943a63a41f
commit
cfa9667d4a
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user