]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: AMx3xx: Centralize early clock initialization
authorLokesh Vutla <lokeshvutla@ti.com>
Fri, 14 Oct 2016 05:05:24 +0000 (10:35 +0530)
committerTom Rini <trini@konsulko.com>
Mon, 21 Nov 2016 18:58:55 +0000 (13:58 -0500)
This is similar to Commit 93e6253d11030 ("ARM: OMAP4/5: Centralize
early clock initialization") that was done for OMAP4+, reflecting the same
for AM33xx and AM43xx SoCs to centralize clock initialization.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Add setup_early_clocks that calls setup_clocks_for_console for
        ti81xx]
Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv7/am33xx/board.c
arch/arm/cpu/armv7/am33xx/clock.c
arch/arm/cpu/armv7/am33xx/clock_ti814x.c
arch/arm/cpu/armv7/am33xx/clock_ti816x.c
arch/arm/include/asm/arch-am33xx/sys_proto.h

index 1ba4ec5a96254dfae00f151193f51e6c3e271619..8340b5437a5bd3cd5777d9347da4d255b4f79549 100644 (file)
@@ -286,7 +286,7 @@ void early_system_init(void)
 #endif
        watchdog_disable();
        set_uart_mux_conf();
-       setup_clocks_for_console();
+       setup_early_clocks();
        uart_soft_reset();
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
        /* Enable RTC32K clock */
index 9b9b78edddc7c97d27391836042673c6e7f33f3f..3d17698e1865b81503a09bc76edb039ebc6c476d 100644 (file)
@@ -232,10 +232,15 @@ __weak void scale_vcores(void)
 {
 }
 
-void prcm_init()
+void setup_early_clocks(void)
 {
+       setup_clocks_for_console();
        enable_basic_clocks();
+       timer_init();
+}
+
+void prcm_init(void)
+{
        scale_vcores();
        setup_dplls();
-       timer_init();
 }
index 9b5a47b01892f36c239638d857c0499e8a49f331..50bd631cf6b56f1022a717551244e3c64cfc41bf 100644 (file)
@@ -386,6 +386,12 @@ void setup_clocks_for_console(void)
        while (readl(&cmalwon->uart0clkctrl) != PRCM_MOD_EN)
                ;
 }
+
+void setup_early_clocks(void)
+{
+       setup_clocks_for_console();
+}
+
 /*
  * Configure the PLL/PRCM for necessary peripherals
  */
index ace4a5afef09f63ddef09efad5a8a466c34e8a50..079ddd7eb9fc12afaed8ab4e5138dd114375e681 100644 (file)
@@ -429,6 +429,11 @@ void setup_clocks_for_console(void)
                ;
 }
 
+void setup_early_clocks(void)
+{
+       setup_clocks_for_console();
+}
+
 void prcm_init(void)
 {
        /* Enable the control */
index ed1a46c2e71d7477e04b30ee5ca7e440fce095aa..4e942baa68fa0565c935a7472c7a43898b666b34 100644 (file)
@@ -19,6 +19,7 @@ u32 get_sysboot_value(void);
 extern struct ctrl_stat *cstat;
 u32 get_device_type(void);
 void save_omap_boot_params(void);
+void setup_early_clocks(void);
 void setup_clocks_for_console(void);
 void mpu_pll_config_val(int mpull_m);
 void ddr_pll_config(unsigned int ddrpll_M);