[U-Boot] [RFC PATCH 3/3] mkconfig: Do not define CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD} in config.h.
Masahiro Yamada
yamada.m at jp.panasonic.com
Tue Apr 22 11:43:46 CEST 2014
This commit modifies mkconfig not to define CONFIG_SYS_ARCH,
CONFIG_SYS_CPU, CONFIG_SYS_SOC, CONFIG_SYS_VENDOR, CONFIG_SYS_BOARD.
They are still used in some board files.
Tegra family, OMAP-Panda board, some Samsung boards.
Add CONFIG_SYS_SOC, CONFIG_SYS_BOARD definition to their header files
to keep the same behavior.
Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
Cc: Lukasz Majewski <l.majewski at samsung.com>
Cc: Piotr Wilczek <p.wilczek at samsung.com>
Cc: Przemyslaw Marczak <p.marczak at samsung.com>
Cc: Sricharan R <r.sricharan at ti.com>
Cc: Stephen Warren <swarren at nvidia.com>
Cc: Tom Warren <twarren at nvidia.com>
---
arch/arm/include/asm/arch-tegra114/tegra.h | 1 +
arch/arm/include/asm/arch-tegra124/tegra.h | 1 +
arch/arm/include/asm/arch-tegra20/tegra.h | 1 +
arch/arm/include/asm/arch-tegra30/tegra.h | 1 +
arch/blackfin/lib/Makefile | 3 ---
include/configs/exynos4-dt.h | 2 +-
include/configs/omap4_panda.h | 1 +
include/configs/s5pc210_universal.h | 2 ++
include/configs/trats.h | 1 +
include/configs/trats2.h | 2 ++
mkconfig | 8 --------
11 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/arm/include/asm/arch-tegra114/tegra.h b/arch/arm/include/asm/arch-tegra114/tegra.h
index 705ca57..e6b56c6 100644
--- a/arch/arm/include/asm/arch-tegra114/tegra.h
+++ b/arch/arm/include/asm/arch-tegra114/tegra.h
@@ -18,6 +18,7 @@
#define _TEGRA114_H_
#define CONFIG_TEGRA114
+#define CONFIG_SYS_SOC "tegra114"
#define NV_PA_SDRAM_BASE 0x80000000 /* 0x80000000 for real T114 */
#define NV_PA_TSC_BASE 0x700F0000 /* System Counter TSC regs */
diff --git a/arch/arm/include/asm/arch-tegra124/tegra.h b/arch/arm/include/asm/arch-tegra124/tegra.h
index 86ebd19..9f455a1 100644
--- a/arch/arm/include/asm/arch-tegra124/tegra.h
+++ b/arch/arm/include/asm/arch-tegra124/tegra.h
@@ -9,6 +9,7 @@
#define _TEGRA124_H_
#define CONFIG_TEGRA124
+#define CONFIG_SYS_SOC "tegra124"
#define NV_PA_SDRAM_BASE 0x80000000
#define NV_PA_TSC_BASE 0x700F0000 /* System Counter TSC regs */
diff --git a/arch/arm/include/asm/arch-tegra20/tegra.h b/arch/arm/include/asm/arch-tegra20/tegra.h
index 6a4b40e..8d50b80 100644
--- a/arch/arm/include/asm/arch-tegra20/tegra.h
+++ b/arch/arm/include/asm/arch-tegra20/tegra.h
@@ -9,6 +9,7 @@
#define _TEGRA20_H_
#define CONFIG_TEGRA20
+#define CONFIG_SYS_SOC "tegra20"
#define NV_PA_SDRAM_BASE 0x00000000
diff --git a/arch/arm/include/asm/arch-tegra30/tegra.h b/arch/arm/include/asm/arch-tegra30/tegra.h
index 4ad8b1c..5ddb1c0 100644
--- a/arch/arm/include/asm/arch-tegra30/tegra.h
+++ b/arch/arm/include/asm/arch-tegra30/tegra.h
@@ -18,6 +18,7 @@
#define _TEGRA30_H_
#define CONFIG_TEGRA30
+#define CONFIG_SYS_SOC "tegra30"
#define NV_PA_SDRAM_BASE 0x80000000 /* 0x80000000 for real T30 */
diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile
index 4ba7bf6..f99dfc7 100644
--- a/arch/blackfin/lib/Makefile
+++ b/arch/blackfin/lib/Makefile
@@ -9,9 +9,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# Unnecessary.
-# Use CONFIG_SYS_BOARD instead of BFIN_BOARD_NAME
-# and delete this.
ccflags-y += -DBFIN_BOARD_NAME='"$(BOARD)"'
obj-y += ins.o
diff --git a/include/configs/exynos4-dt.h b/include/configs/exynos4-dt.h
index 2040bf7..2063887 100644
--- a/include/configs/exynos4-dt.h
+++ b/include/configs/exynos4-dt.h
@@ -13,7 +13,7 @@
#define CONFIG_SAMSUNG /* in a SAMSUNG core */
#define CONFIG_S5P /* S5P Family */
#define CONFIG_EXYNOS4 /* which is in a Exynos4 Family */
-
+#define CONFIG_SYS_SOC "exynos"
#include <asm/arch/cpu.h> /* get chip and board defs */
#define CONFIG_ARCH_CPU_INIT
diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 7378acd..4a844a1 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -15,6 +15,7 @@
/*
* High Level Configuration Options
*/
+#define CONFIG_SYS_BOARD "panda"
/* USB UHH support options */
#define CONFIG_CMD_USB
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 509bd06..ac914f9 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -14,6 +14,8 @@
#define CONFIG_SYS_PROMPT "Universal # " /* Monitor Command Prompt */
+#define CONFIG_SYS_BOARD "universal_c210"
+
#undef CONFIG_DEFAULT_DEVICE_TREE
#define CONFIG_DEFAULT_DEVICE_TREE exynos4210-universal_c210
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 29cabab..19160ac 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -15,6 +15,7 @@
#define CONFIG_SYS_PROMPT "Trats # " /* Monitor Command Prompt */
#define CONFIG_TRATS
+#define CONFIG_SYS_BOARD "trats"
#undef CONFIG_DEFAULT_DEVICE_TREE
#define CONFIG_DEFAULT_DEVICE_TREE exynos4210-trats
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index f39a70b..7c6221e 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -15,6 +15,8 @@
#define CONFIG_SYS_PROMPT "Trats2 # " /* Monitor Command Prompt */
+#define CONFIG_SYS_BOARD "trats2"
+
#undef CONFIG_DEFAULT_DEVICE_TREE
#define CONFIG_DEFAULT_DEVICE_TREE exynos4412-trats2
diff --git a/mkconfig b/mkconfig
index cd911a9..ccdc61c 100755
--- a/mkconfig
+++ b/mkconfig
@@ -171,14 +171,6 @@ for i in ${TARGETS} ; do
echo "#define CONFIG_${i}" >>config.h ;
done
-echo "#define CONFIG_SYS_ARCH \"${arch}\"" >> config.h
-echo "#define CONFIG_SYS_CPU \"${cpu}\"" >> config.h
-echo "#define CONFIG_SYS_BOARD \"${board}\"" >> config.h
-
-[ "${vendor}" ] && echo "#define CONFIG_SYS_VENDOR \"${vendor}\"" >> config.h
-
-[ "${soc}" ] && echo "#define CONFIG_SYS_SOC \"${soc}\"" >> config.h
-
[ "${board}" ] && echo "#define CONFIG_BOARDDIR board/$BOARDDIR" >> config.h
cat << EOF >> config.h
#include <config_cmd_defaults.h>
--
1.8.3.2
More information about the U-Boot
mailing list