As part of migrating support for ATAGs to Kconfig, add an option for
setting and passing MACH_TYPE.

Signed-off-by: Tom Rini <tr...@konsulko.com>
---
 arch/arm/Kconfig                  | 7 +++++++
 configs/icnova-a20-swac_defconfig | 1 +
 configs/nokia_rx51_defconfig      | 1 +
 include/configs/nokia_rx51.h      | 2 --
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 32fac7c53f66..5a1c4a891c3f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1920,6 +1920,13 @@ config SERIAL_TAG
        bool "Pass system serial number via ATAG"
        depends on SUPPORT_PASSING_ATAGS
 
+config MACH_TYPE
+       int "Machine ID number"
+       depends on SUPPORT_PASSING_ATAGS
+       help
+         When booting via ATAGs, the machine type must be passed as a number.
+         For the full list see https://www.arm.linux.org.uk/developer/machines
+
 config ARCH_SUPPORT_TFABOOT
        bool
 
diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index dceb74acf30a..eefec777a9f4 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -4,6 +4,7 @@ CONFIG_SUPPORT_PASSING_ATAGS=y
 CONFIG_CMDLINE_TAG=y
 CONFIG_INITRD_TAG=y
 CONFIG_SERIAL_TAG=y
+CONFIG_MACH_TYPE=4283
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 CONFIG_SPL=y
 CONFIG_MACH_SUN7I=y
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index 1a6158042497..3c73701a61dc 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -5,6 +5,7 @@ CONFIG_SUPPORT_PASSING_ATAGS=y
 CONFIG_CMDLINE_TAG=y
 CONFIG_INITRD_TAG=y
 CONFIG_REVISION_TAG=y
+CONFIG_MACH_TYPE=1955
 CONFIG_SYS_TEXT_BASE=0x80008000
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_TARGET_NOKIA_RX51=y
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index e193290de06f..6c7faae45222 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -23,8 +23,6 @@
  */
 #define CONFIG_SYS_L2CACHE_OFF         /* pretend there is no L2 CACHE */
 
-#define CONFIG_MACH_TYPE               MACH_TYPE_NOKIA_RX51
-
 #include <asm/arch/cpu.h>              /* get chip and board defs */
 #include <asm/arch/omap.h>
 #include <asm/arch/mem.h>
-- 
2.17.1

Reply via email to