diff options
author | Terry Lv <r65388@freescale.com> | 2009-10-29 19:19:00 +0800 |
---|---|---|
committer | Terry Lv <r65388@freescale.com> | 2009-11-03 18:22:03 +0800 |
commit | ba816f983f5dac44d9f4461906b9bc0101237ac8 (patch) | |
tree | 52d3b83aa1cc146b88933f75b0a65c2dc813ea28 /board/freescale/mx51_3stack | |
parent | 3227c278048e6b13397d9d0793e77e703649d7de (diff) | |
download | u-boot-imx-ba816f983f5dac44d9f4461906b9bc0101237ac8.zip u-boot-imx-ba816f983f5dac44d9f4461906b9bc0101237ac8.tar.gz u-boot-imx-ba816f983f5dac44d9f4461906b9bc0101237ac8.tar.bz2 |
u-boot v2009.08 sd/mmc support.
Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'board/freescale/mx51_3stack')
-rw-r--r-- | board/freescale/mx51_3stack/config.mk | 2 | ||||
-rw-r--r-- | board/freescale/mx51_3stack/mx51_3stack.c | 27 |
2 files changed, 22 insertions, 7 deletions
diff --git a/board/freescale/mx51_3stack/config.mk b/board/freescale/mx51_3stack/config.mk index ce7369d..705aa34 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 4ee342e..50aec8c 100644 --- a/board/freescale/mx51_3stack/mx51_3stack.c +++ b/board/freescale/mx51_3stack/mx51_3stack.c @@ -32,12 +32,12 @@ #include <mxc_keyb.h> #include <asm/arch/keypad.h> #include "board-mx51_3stack.h" +#include <netdev.h> 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) |