Commit 97ce274d97e9c1796d58ae34aadcbc10293cccd7

Authored by Chin Liang See
Committed by Marek Vasut
1 parent ddcbed04a2

arm: socfpga: Enable SDMMC boot for SOCFPGA U-Boot

Enable the SDMMC boot as default boot for SOCFPGA U-Boot dev kit.
Enable the bootz command as zImage is used instead uImage.

Signed-off-by: Chin Liang See <clsee@altera.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>

Showing 1 changed file with 18 additions and 4 deletions Side-by-side Diff

include/configs/socfpga_cyclone5.h
... ... @@ -93,6 +93,8 @@
93 93 #include <config_cmd_default.h>
94 94 /* FAT file system support */
95 95 #define CONFIG_CMD_FAT
  96 +/* bootz command support */
  97 +#define CONFIG_CMD_BOOTZ
96 98  
97 99  
98 100 /*
99 101  
100 102  
101 103  
102 104  
... ... @@ -117,24 +119,36 @@
117 119 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
118 120 #define CONFIG_CMD_RUN
119 121  
  122 +#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
120 123 #define CONFIG_BOOTCOMMAND "run ramboot"
  124 +#else
  125 +#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"
  126 +#endif
121 127  
122 128 /*
123 129 * arguments passed to the bootm command. The value of
124 130 * CONFIG_BOOTARGS goes into the environment value "bootargs".
125 131 * Do note the value will overide also the chosen node in FDT blob.
126 132 */
127   -#define CONFIG_BOOTARGS "console=ttyS0,57600,mem=256M@0x0"
  133 +#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)
128 134  
129 135 #define CONFIG_EXTRA_ENV_SETTINGS \
130 136 "verify=n\0" \
131 137 "loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
132 138 "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
133 139 "bootm ${loadaddr} - ${fdt_addr}\0" \
134   - "bootimage=uImageImage\0" \" \
  140 + "bootimage=zImageImage\0" \" \
135 141 "fdt_addr=100\0" \
136   - "fsloadcmd=ext2load\0" \
137   - "bootm ${loadaddr} - ${fdt_addr}\0" \
  142 + "fdtimage=socfpga.dtb\0" \
  143 + "fsloadcmd=ext2load\0" \
  144 + "bootm ${loadaddr} - ${fdt_addr}\0" \
  145 + "mmcroot=/dev/mmcblk0p2\0" \
  146 + "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
  147 + " root=${mmcroot} rw rootwait;" \
  148 + "bootz ${loadaddr} - ${fdt_addr}\0" \
  149 + "mmcload=mmc rescan;" \
  150 + "fatload mmc 0:1 ${loadaddr} ${bootimage};" \
  151 + "fatload mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
138 152 "qspiroot=/dev/mtdblock0\0" \
139 153 "qspirootfstype=jffs2\0" \
140 154 "qspiboot=setenv bootargs " CONFIG_BOOTARGS \