Patchwork [U-Boot,1/1] MX51EVK: UART does not print out the early information

login
register
mail settings
Submitter Liu Hui-R64343
Date Dec. 23, 2010, 11:13 a.m.
Message ID <1293102797-19243-1-git-send-email-r64343@freescale.com>
Download mbox | patch
Permalink /patch/76503/
State Accepted
Commit 877eb0f91543dc5bca385bb6d22454b1d43f3e2d
Delegated to: Stefano Babic
Headers show

Comments

Liu Hui-R64343 - Dec. 23, 2010, 11:13 a.m.
The early bootup information is not print out due to
the UART pin iomux not set up correctly before board_init

Add the board_early_init_f function and enable the
CONFIG_BOARD_EARLY_INIT_F. Move the UART pin setting
from board_init to board_early_init_f function.

This patch also move the FEC pin iomux setup to the
board_early_init_f.

Signed-off-by: Jason Liu <r64343@freescale.com>
---
 board/freescale/mx51evk/mx51evk.c |   11 ++++++++---
 include/configs/mx51evk.h         |    2 ++
 2 files changed, 10 insertions(+), 3 deletions(-)
Stefano Babic - Dec. 27, 2010, 11:35 a.m.
On 12/23/2010 12:13 PM, Jason Liu wrote:
> The early bootup information is not print out due to
> the UART pin iomux not set up correctly before board_init
> 
> Add the board_early_init_f function and enable the
> CONFIG_BOARD_EARLY_INIT_F. Move the UART pin setting
> from board_init to board_early_init_f function.
> 
> This patch also move the FEC pin iomux setup to the
> board_early_init_f.
> 
> Signed-off-by: Jason Liu <r64343@freescale.com>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 2160d5a..7c50c54 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -399,6 +399,14 @@  int board_mmc_init(bd_t *bis)
 }
 #endif
 
+int board_early_init_f(void)
+{
+	setup_iomux_uart();
+	setup_iomux_fec();
+
+	return 0;
+}
+
 int board_init(void)
 {
 	system_rev = get_cpu_rev();
@@ -407,9 +415,6 @@  int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
-	setup_iomux_uart();
-	setup_iomux_fec();
-
 	return 0;
 }
 
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index 3d6d390..591d6e1 100755
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -202,6 +202,8 @@ 
 #define CONFIG_SYS_INIT_RAM_ADDR	(IRAM_BASE_ADDR)
 #define CONFIG_SYS_INIT_RAM_SIZE	(IRAM_SIZE)
 
+#define CONFIG_BOARD_EARLY_INIT_F
+
 #define CONFIG_SYS_INIT_SP_OFFSET \
 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_ADDR \