[U-Boot] [PATCH 1/3] tegra: only define TEGRA_DEVICE_SETTINGS if not already defined

Stephen Warren swarren at wwwdotorg.org
Wed Nov 28 18:50:10 CET 2012


From: Stephen Warren <swarren at nvidia.com>

seaboard.h attempts to undefine TEGRA_DEVICE_SETTINGS and provide a
custom value. This worked when the "pre" included tegra20-common.h
provided the default. However, changes in the main U-Boot repo removed
this default from the "pre" included tegra20-common.h to the "post"
included tegra-common-post.h, which uncondtionally provides the value.
This causes the following compile warnings:

In file included from /home/swarren/shared/git_wa/u-boot/include/configs/seaboard.h:129:0,
                 from /home/swarren/shared/git_wa/u-boot/include/config.h:10,
                 from /home/swarren/shared/git_wa/u-boot/include/common.h:37,
                 from lib/asm-offsets.c:18:
/home/swarren/shared/git_wa/u-boot/include/configs/tegra-common-post.h:163:0: warning: "TEGRA_DEVICE_SETTINGS" redefined
/home/swarren/shared/git_wa/u-boot/include/configs/seaboard.h:110:0: note: this is the location of the previous definition

Solve this by modifying tegra-common-post.h to only provide a value for
TEGRA_DEVICE_SETTINGS if the board-specific header has not already
provided a custom value.

Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
My personal opinion is that when u-boot-tegra/master is rebuilt, this
series should be the first patches in the branch, and the current patches
that are in u-boot-tegra/next which add LCD support for boards other than
Seaboard should be re-written to assume that tegra-common-post.h will
provide the appropriate value for TEGRA_DEVICE_SETTINGS, and hence the
board config .h files don't need to define any custom value for
TEGRA_DEVICE_SETTINGS.

Otherwise, if you "git bisect" the next version of u-boot-tegra/master,
you'll get the same compile warnings I mention above on all the other
boards until the point when patch 1 in this series is applied.

 include/configs/tegra-common-post.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index ab62e71..1662844 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -146,6 +146,7 @@
 	"fdt_addr_r=0x02000000\0" \
 	"ramdisk_addr_r=0x02100000\0" \
 
+#ifndef TEGRA_DEVICE_SETTINGS
 #ifdef CONFIG_TEGRA_KEYBOARD
 #define STDIN_KBD_KBC ",tegra-kbc"
 #else
@@ -165,6 +166,8 @@
 	"stdout=serial\0" \
 	"stderr=serial\0" \
 
+#endif /* TEGRA_DEVICE_SETTINGS */
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	TEGRA_DEVICE_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
-- 
1.7.10.4



More information about the U-Boot mailing list