From 1e1cbde0db46c96a236b7b3c5604d1f30467cb2d Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 19 Apr 2013 03:41:59 +0000 Subject: wandboard: Use env storage info for mmcdev/mmcpart This makes environment and mmcdev/mmcpart in sync with SYS_MMC_ENV_DEV and SYS_MMC_ENV_PART settings. Signed-off-by: Otavio Salvador --- include/configs/wandboard.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/configs/wandboard.h') diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index 120e3f6ffd0..bd3e727a175 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -97,8 +97,8 @@ "fdt_addr=0x11000000\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ - "mmcdev=0\0" \ - "mmcpart=2\0" \ + "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ + "mmcpart=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \ "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ @@ -198,6 +198,7 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_OFFSET (6 * 64 * 1024) #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 2 #define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ -- cgit v1.2.3 From 0798d5785d3fe71f1e2b30dab908fc9a9b40e016 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 19 Apr 2013 03:42:00 +0000 Subject: wandboard: Add update_sd_firmware support This allow for easy update of firmware in the SD card from a running U-Boot. Signed-off-by: Otavio Salvador --- include/configs/wandboard.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/configs/wandboard.h') diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index bd3e727a175..0dc328687b7 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -47,6 +47,8 @@ #undef CONFIG_CMD_IMLS +#define CONFIG_CMD_SETEXPR + #define CONFIG_BOOTDELAY 5 #define CONFIG_SYS_MEMTEST_START 0x10000000 @@ -100,6 +102,20 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \ "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ + "update_sd_firmware_filename=u-boot.imx\0" \ + "update_sd_firmware=" \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "if mmc dev ${mmcdev}; then " \ + "if ${get_cmd} ${update_sd_firmware_filename}; then " \ + "setexpr fw_sz ${filesize} / 0x200; " \ + "setexpr fw_sz ${fw_sz} + 1; " \ + "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ + "fi; " \ + "fi\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ "loadbootscript=" \ -- cgit v1.2.3 From 5ed15738d915b75b6a2bd9c3095005481c4df3d1 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 19 Apr 2013 03:42:02 +0000 Subject: wandboard: Add support for Carrier Board MicroSD card Allow use of the carrier board MicroSD card available in the Wandboard; this allow for loading alternative system from the other card for testing or upgrade proposes. Signed-off-by: Otavio Salvador --- include/configs/wandboard.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs/wandboard.h') diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index 0dc328687b7..9898f55d6c2 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -59,6 +59,7 @@ /* MMC Configuration */ #define CONFIG_FSL_ESDHC #define CONFIG_FSL_USDHC +#define CONFIG_SYS_FSL_USDHC_NUM 2 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 #define CONFIG_MMC -- cgit v1.2.3 From eaffaa2d25ce6e94a965460467352bd12513bf09 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 19 Apr 2013 03:42:03 +0000 Subject: wandboard: Add boot selection support Adds support for 'bmode' command which let user to choose where to boot from; this allows U-Boot to load system from another storage without messing with jumpers. Signed-off-by: Otavio Salvador --- include/configs/wandboard.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/configs/wandboard.h') diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index 9898f55d6c2..9d7ec3f6ff0 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -32,6 +32,7 @@ #define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M) #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO #define CONFIG_MXC_UART @@ -47,6 +48,7 @@ #undef CONFIG_CMD_IMLS +#define CONFIG_CMD_BMODE #define CONFIG_CMD_SETEXPR #define CONFIG_BOOTDELAY 5 -- cgit v1.2.3