diff mbox

[PATCHv10,41/41] ARM: OMAP3: use DT clock init if DT data is available

Message ID 1385453182-24421-42-git-send-email-t-kristo@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tero Kristo Nov. 26, 2013, 8:06 a.m. UTC
OMAP3 platforms support both DT and non-DT boot at the moment, make
the clock init work according to the used setup.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/io.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Tony Lindgren Nov. 26, 2013, 5:44 p.m. UTC | #1
* Tero Kristo <t-kristo@ti.com> [131126 00:10]:
> OMAP3 platforms support both DT and non-DT boot at the moment, make
> the clock init work according to the used setup.

We're making omap3 to be DT only as well, so it might make sense to
drop the omap3 clock data as well while at it. Or do it later to
avoid adding dependencies, up to you.

Regards,

Tony
Tero Kristo Nov. 27, 2013, 9:06 a.m. UTC | #2
On 11/26/2013 07:44 PM, Tony Lindgren wrote:
> * Tero Kristo <t-kristo@ti.com> [131126 00:10]:
>> OMAP3 platforms support both DT and non-DT boot at the moment, make
>> the clock init work according to the used setup.
>
> We're making omap3 to be DT only as well, so it might make sense to
> drop the omap3 clock data as well while at it. Or do it later to
> avoid adding dependencies, up to you.

Ok, I can remove it with next rev if you like.

-Tero
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 0937e50..05cdff3 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -488,21 +488,29 @@  void __init omap3_init_early(void)
 void __init omap3430_init_early(void)
 {
 	omap3_init_early();
+	if (of_have_populated_dt())
+		omap_clk_soc_init = omap3430_dt_clk_init;
 }
 
 void __init omap35xx_init_early(void)
 {
 	omap3_init_early();
+	if (of_have_populated_dt())
+		omap_clk_soc_init = omap3430_dt_clk_init;
 }
 
 void __init omap3630_init_early(void)
 {
 	omap3_init_early();
+	if (of_have_populated_dt())
+		omap_clk_soc_init = omap3630_dt_clk_init;
 }
 
 void __init am35xx_init_early(void)
 {
 	omap3_init_early();
+	if (of_have_populated_dt())
+		omap_clk_soc_init = am35xx_dt_clk_init;
 }
 
 void __init ti81xx_init_early(void)
@@ -520,7 +528,10 @@  void __init ti81xx_init_early(void)
 	omap3xxx_clockdomains_init();
 	omap3xxx_hwmod_init();
 	omap_hwmod_init_postsetup();
-	omap_clk_soc_init = omap3xxx_clk_init;
+	if (of_have_populated_dt())
+		omap_clk_soc_init = ti81xx_dt_clk_init;
+	else
+		omap_clk_soc_init = omap3xxx_clk_init;
 }
 
 void __init omap3_init_late(void)