This patch enables the mmc driver as well as support for FAT and ext2.

It also sets up environment settings to facilitate booting from mmc

Signed-off-by: Steve Sakoman <st...@sakoman.com>
---
 include/configs/omap4_sdp4430.h |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/include/configs/omap4_sdp4430.h b/include/configs/omap4_sdp4430.h
index 07ab93f..3a14d34 100644
--- a/include/configs/omap4_sdp4430.h
+++ b/include/configs/omap4_sdp4430.h
@@ -94,12 +94,23 @@
 #define CONFIG_SYS_BAUDRATE_TABLE      {4800, 9600, 19200, 38400, 57600,\
                                        115200}
 
+/* MMC */
+#define CONFIG_MMC                     1
+#define CONFIG_OMAP3_MMC               1
+#define CONFIG_SYS_MMC_SET_DEV         1
+#define CONFIG_DOS_PARTITION           1
+
 /* Flash */
 #define CONFIG_SYS_NO_FLASH    1
 
 /* commands to include */
 #include <config_cmd_default.h>
 
+/* Enabled commands */
+#define CONFIG_CMD_EXT2                /* EXT2 Support                 */
+#define CONFIG_CMD_FAT         /* FAT support                  */
+#define CONFIG_CMD_MMC         /* MMC support                  */
+
 /* Disabled commands */
 #undef CONFIG_CMD_NET
 #undef CONFIG_CMD_FPGA         /* FPGA configuration Support   */
@@ -121,6 +132,31 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "loadaddr=0x82000000\0" \
        "console=ttyS2,115200n8\0" \
+       "mmcdev=1\0" \
+       "mmcroot=/dev/mmcblk0p2 rw\0" \
+       "mmcrootfstype=ext3 rootwait\0" \
+       "mmcargs=setenv bootargs console=${console} " \
+               "root=${mmcroot} " \
+               "rootfstype=${mmcrootfstype}\0" \
+       "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+       "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
+               "source ${loadaddr}\0" \
+       "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
+       "mmcboot=echo Booting from mmc${mmcdev} ...; " \
+               "run mmcargs; " \
+               "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+       "if mmc init ${mmcdev}; then " \
+               "if run loadbootscript; then " \
+                       "run bootscript; " \
+               "else " \
+                       "if run loaduimage; then " \
+                               "run mmcboot; " \
+                       "else run nandboot; " \
+                       "fi; " \
+               "fi; " \
+       "fi"
 
 #define CONFIG_AUTO_COMPLETE           1
 
-- 
1.7.0.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to