From ba816f983f5dac44d9f4461906b9bc0101237ac8 Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Thu, 29 Oct 2009 19:19:00 +0800 Subject: u-boot v2009.08 sd/mmc support. Signed-off-by: Terry Lv --- board/freescale/mx51_3stack/config.mk | 2 ++ board/freescale/mx51_3stack/mx51_3stack.c | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'board/freescale/mx51_3stack') diff --git a/board/freescale/mx51_3stack/config.mk b/board/freescale/mx51_3stack/config.mk index ce7369d858c..705aa34f289 100644 --- a/board/freescale/mx51_3stack/config.mk +++ b/board/freescale/mx51_3stack/config.mk @@ -1 +1,3 @@ +LDSCRIPT := $(SRCTREE)/board/$(VENDOR)/$(BOARD)/u-boot.lds + TEXT_BASE = 0x97800000 diff --git a/board/freescale/mx51_3stack/mx51_3stack.c b/board/freescale/mx51_3stack/mx51_3stack.c index 4ee342e814d..50aec8c2ed2 100644 --- a/board/freescale/mx51_3stack/mx51_3stack.c +++ b/board/freescale/mx51_3stack/mx51_3stack.c @@ -32,12 +32,12 @@ #include #include #include "board-mx51_3stack.h" +#include DECLARE_GLOBAL_DATA_PTR; static u32 system_rev; u32 mx51_io_base_addr; -volatile u32 *esdhc_base_pointer; u32 get_board_rev(void) { @@ -349,20 +349,26 @@ int checkboard(void) return 0; } +#if defined(CONFIG_SMC911X) +extern int smc911x_initialize(u8 dev_num, int base_addr); +#endif + #ifdef CONFIG_NET_MULTI int board_eth_init(bd_t *bis) { int rc = -ENODEV; -#if defined(CONFIG_DRIVER_SMC911X) - rc = smc911x_initialize(bis); +#if defined(CONFIG_SMC911X) + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); #endif return rc; } #endif -#ifdef CONFIG_FSL_MMC +#ifdef CONFIG_CMD_MMC + +u32 *imx_esdhc_base_addr; -int sdhc_init(void) +int esdhc_gpio_init(void) { u32 interface_esdhc = 0; s32 status = 0; @@ -372,7 +378,7 @@ int sdhc_init(void) switch (interface_esdhc) { case 0: - esdhc_base_pointer = (volatile u32 *)MMC_SDHC1_BASE_ADDR; + imx_esdhc_base_addr = (u32 *)MMC_SDHC1_BASE_ADDR; mxc_request_iomux(MX51_PIN_SD1_CMD, IOMUX_CONFIG_ALT0 | IOMUX_CONFIG_SION); @@ -432,9 +438,16 @@ int sdhc_init(void) break; } - return status = 1; + return status; } +int board_mmc_init(void) +{ + if (!esdhc_gpio_init()) + return fsl_esdhc_mmc_init(gd->bd); + else + return -1; +} #endif #if defined(CONFIG_MXC_KPD) -- cgit v1.2.3