[U-Boot] [PATCH V2 1/5] ARM: tegra: set env vars to indicate Cardhu A04 support

Stephen Warren swarren at wwwdotorg.org
Thu Jan 23 21:17:01 CET 2014


From: Stephen Warren <swarren at nvidia.com>

The U-Boot "cardhu" build supports only revision 4 of the Cardhu board
and later compatible revisions. Hence, set $board_name in the default
environment to "cardhu-a04" rather than just "cardhu".

The Linux kernel has separate DTs for Cardhu A02 and A04, although the
former isn't really supported any more. Consequently, the kernel DT file
that matches the U-Boot cardhu build is "tegra30-cardhu-a04.dtb" rather
than "tegra30-cardhu.dtb". Set the $fdtfile default environment variable
to reflect this.

Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
v2: New patch.

Note that this series depends on the following, which are not yet
applied:

(dgilmore) cmd_pxe.c add any option for filesystem with sysboot uses generic load
(dgilmore) config: add config_distro_defaults.h
(swarren) pxe: implement fdtdir extlinux.conf tag
(swarren) fs: fix generic save command implementation
(swarren) fs: implement infra-structure for an 'exists' function
(swarren) sandbox: implement fs_exists() and 'sb exists' shell function
(swarren) ext4: implement exists() for ext4fs
(swarren) fat: implement exists() for FAT fs
---
 include/configs/cardhu.h            | 4 ++++
 include/configs/tegra-common-post.h | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
index 4abb03ea56dd..e80d1a6fa3a4 100644
--- a/include/configs/cardhu.h
+++ b/include/configs/cardhu.h
@@ -30,6 +30,10 @@
 #define V_PROMPT		"Tegra30 (Cardhu) # "
 #define CONFIG_TEGRA_BOARD_STRING	"NVIDIA Cardhu"
 
+#define BOARD_EXTRA_ENV_SETTINGS \
+	"board_name=cardhu-a04\0" \
+	"fdtfile=tegra30-cardhu-a04.dtb\0"
+
 /* Board-specific serial config */
 #define CONFIG_SERIAL_MULTI
 #define CONFIG_TEGRA_ENABLE_UARTA
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index a3242fe61299..020b9b17b1d0 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -129,10 +129,15 @@
 	"stderr=serial" STDOUT_LCD "\0" \
 	""
 
+#ifndef BOARD_EXTRA_ENV_SETTINGS
+#define BOARD_EXTRA_ENV_SETTINGS
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	TEGRA_DEVICE_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
-	BOOTCMDS_COMMON
+	BOOTCMDS_COMMON \
+	BOARD_EXTRA_ENV_SETTINGS
 
 #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
 #define CONFIG_FDT_SPI
-- 
1.8.1.5



More information about the U-Boot mailing list