summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-05-11 20:50:22 -0300
committerStefano Babic <sbabic@denx.de>2015-05-21 18:08:37 +0200
commit0d1ea05210f3221667f8085cf167f23f336ca0c0 (patch)
tree007d8b8a85dcde97cf99f50254579fd300a85217 /include
parenta91db95479e75c70ec49676e9a347787b054d651 (diff)
downloadtalos-obmc-uboot-0d1ea05210f3221667f8085cf167f23f336ca0c0.tar.gz
talos-obmc-uboot-0d1ea05210f3221667f8085cf167f23f336ca0c0.zip
wandboard: Switch to SPL support
Currently we need to build one U-boot image for each of the wandboard variants: quad, dual-lite and solo. By switching to SPL we can support all these variants with a single binary, which is very convenient. Based on the work from Richard Hu. Tested kernel booting on the three boards. Signed-off-by: Richard Hu <hakahu@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Vagrant Cascadian <vagrant@aikidev.net> Reviewed-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/configs/wandboard.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index b2c36148ba..7ce861eeac 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -14,6 +14,10 @@
#include <asm/imx-common/gpio.h>
#include <linux/sizes.h>
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_MMC_SUPPORT
+#include "imx6_spl.h"
+
#define CONFIG_MX6
#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO
@@ -125,20 +129,15 @@
#define CONFIG_MXC_OCOTP
#endif
-#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
-#define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
-#elif defined(CONFIG_MX6Q)
-#define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb"
-#endif
-
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
"console=ttymxc0\0" \
"splashpos=m,m\0" \
+ "fdtfile=undefined\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
- "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
"fdt_addr=0x18000000\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
@@ -192,7 +191,7 @@
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
@@ -220,7 +219,7 @@
"fi; " \
"${get_cmd} ${image}; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
+ "if ${get_cmd} ${fdt_addr} ${fdtfile}; then " \
"bootz ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
@@ -231,9 +230,17 @@
"fi; " \
"else " \
"bootz; " \
- "fi;\0"
+ "fi;\0" \
+ "findfdt="\
+ "if test $board_rev = MX6Q ; then " \
+ "setenv fdtfile imx6q-wandboard.dtb; fi; " \
+ "if test $board_rev = MX6DL ; then " \
+ "setenv fdtfile imx6dl-wandboard.dtb; fi; " \
+ "if test $fdtfile = undefined; then " \
+ "echo WARNING: Could not determine dtb to use; fi; \0" \
#define CONFIG_BOOTCOMMAND \
+ "run findfdt; " \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \
OpenPOWER on IntegriCloud