omap-common/omap4: relocate early UART clock setup
authorSimon Schwarz <simonschwarzcor@googlemail.com>
Wed, 14 Sep 2011 19:14:46 +0000 (15:14 -0400)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 30 Sep 2011 20:00:54 +0000 (22:00 +0200)
Moves the early UART clock setup setup_clocks_for_console() from
preloader_console_init() to s_init() of OMAP4.

This is done to prepare for OMAP3 integration.

This patch was posted seperatly to the mailinglist but I decidet - since it is
a prereqesit for this patch to add it. Former port to ML:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/104395

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
arch/arm/cpu/armv7/omap-common/spl.c
arch/arm/cpu/armv7/omap4/board.c

index d1776522b7fa5d00e936eb07f9050a547baeffe6..1d301f40c627d0164c2c86d55531c7b264e292f3 100644 (file)
@@ -249,6 +249,7 @@ void board_init_r(gd_t *id, ulong dummy)
        }
 }
 
+/* This requires UART clocks to be enabled */
 void preloader_console_init(void)
 {
        const char *u_boot_rev = U_BOOT_VERSION;
@@ -259,7 +260,6 @@ void preloader_console_init(void)
        gd->flags |= GD_FLG_RELOC;
        gd->baudrate = CONFIG_BAUDRATE;
 
-       setup_clocks_for_console();
        serial_init();          /* serial communications setup */
 
        /* Avoid a second "U-Boot" coming from this string */
index 309b244ad2f4100f6293f0d7b5687ce03f40c5bc..8584fdd590382a2b8f23da2e6ce4e75c6d759e81 100644 (file)
@@ -257,6 +257,7 @@ void s_init(void)
        watchdog_init();
        set_mux_conf_regs();
 #ifdef CONFIG_SPL_BUILD
+       setup_clocks_for_console();
        preloader_console_init();
        do_io_settings();
 #endif