Patchwork [U-Boot,V8,1/9] omap-common/omap4: relocate early UART clock setup

login
register
mail settings
Submitter Simon Schwarz
Date Aug. 2, 2011, 3:59 p.m.
Message ID <1312300757-9039-2-git-send-email-simonschwarzcor@gmail.com>
Download mbox | patch
Permalink /patch/107964/
State Superseded
Headers show

Comments

Simon Schwarz - Aug. 2, 2011, 3:59 p.m.
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>
---

Did not exist before V7.

V8 changes:
nothing
---
 arch/arm/cpu/armv7/omap-common/spl.c |    2 +-
 arch/arm/cpu/armv7/omap4/board.c     |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c
index d177652..1d301f4 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -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 */
diff --git a/arch/arm/cpu/armv7/omap4/board.c b/arch/arm/cpu/armv7/omap4/board.c
index 5943d61..a9e90de 100644
--- a/arch/arm/cpu/armv7/omap4/board.c
+++ b/arch/arm/cpu/armv7/omap4/board.c
@@ -196,6 +196,7 @@  void s_init(void)
 	watchdog_init();
 	set_mux_conf_regs();
 #ifdef CONFIG_SPL_BUILD
+	setup_clocks_for_console();
 	preloader_console_init();
 #endif
 	prcm_init();