From patchwork Wed Nov 28 17:50:10 2012
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot,
1/3] tegra: only define TEGRA_DEVICE_SETTINGS if not already defined
X-Patchwork-Submitter: Stephen Warren
X-Patchwork-Id: 202514
X-Patchwork-Delegate: twarren@nvidia.com
Message-Id: <1354125012-8877-1-git-send-email-swarren@wwwdotorg.org>
To: u-boot@lists.denx.de, Simon Glass ,
Tom Warren , Stephen Warren
Date: Wed, 28 Nov 2012 10:50:10 -0700
From: Stephen Warren
List-Id: U-Boot discussion
From: Stephen Warren
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
Tested-by: Simon Glass
---
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 \