ARM: OMAP2: clock: use DT clock boot if available
authorTero Kristo <t-kristo@ti.com>
Mon, 24 Feb 2014 16:51:05 +0000 (18:51 +0200)
committerTero Kristo <t-kristo@ti.com>
Wed, 2 Jul 2014 12:47:32 +0000 (15:47 +0300)
Otherwise legacy boot clock data is used. This patch also includes the
clock data files to the base dtsi files.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
arch/arm/boot/dts/omap2420.dtsi
arch/arm/boot/dts/omap2430.dtsi
arch/arm/mach-omap2/io.c

index e83b046..2ad3e3b 100644 (file)
 &i2c2 {
        compatible = "ti,omap2420-i2c";
 };
+
+/include/ "omap24xx-clocks.dtsi"
+/include/ "omap2420-clocks.dtsi"
index c4e8013..f9ab99d 100644 (file)
 &i2c2 {
        compatible = "ti,omap2430-i2c";
 };
+
+/include/ "omap24xx-clocks.dtsi"
+/include/ "omap2430-clocks.dtsi"
index 8f55945..80bf633 100644 (file)
@@ -53,6 +53,7 @@
 #include "prm2xxx.h"
 #include "prm3xxx.h"
 #include "prm44xx.h"
+#include "opp2xxx.h"
 
 /*
  * omap_clk_soc_init: points to a function that does the SoC-specific
@@ -410,7 +411,12 @@ void __init omap2420_init_early(void)
        omap242x_clockdomains_init();
        omap2420_hwmod_init();
        omap_hwmod_init_postsetup();
-       omap_clk_soc_init = omap2420_clk_init;
+       if (of_have_populated_dt()) {
+               omap_clk_soc_init = omap2420_dt_clk_init;
+               rate_table = omap2420_rate_table;
+       } else {
+               omap_clk_soc_init = omap2420_clk_init;
+       }
 }
 
 void __init omap2420_init_late(void)
@@ -439,7 +445,12 @@ void __init omap2430_init_early(void)
        omap243x_clockdomains_init();
        omap2430_hwmod_init();
        omap_hwmod_init_postsetup();
-       omap_clk_soc_init = omap2430_clk_init;
+       if (of_have_populated_dt()) {
+               omap_clk_soc_init = omap2430_dt_clk_init;
+               rate_table = omap2430_rate_table;
+       } else {
+               omap_clk_soc_init = omap2430_clk_init;
+       }
 }
 
 void __init omap2430_init_late(void)