Skip to contentSkip to conversation

arm: Set default MACH_TYPE in Kconfig

PATCH In review Pali Rohár 2 participants 2 messages Aug 11, 2022 – Aug 20, 2022 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Set default MACH_TYPE in Kconfig

For boards which requires correct MACH_TYPE, set their correct default values directly in Kconfig.

---
 arch/arm/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/Kconfig +5 -0
index 9898c7d68e1b..f78726f7c1be 100644
@@ -2119,6 +2119,7 @@ config SERIAL_TAG
 
 config STATIC_MACH_TYPE
 	bool "Statically define the Machine ID number"
+	default y if TARGET_DS109 || TARGET_NOKIA_RX51 || TARGET_DS414 || DEFAULT_DEVICE_TREE = "sun7i-a20-icnova-swac"
 	help
 	  When booting via ATAGs, enable this option if we know the correct
 	  machine ID number to use at compile time.  Some systems will be
@@ -2127,6 +2128,10 @@ config STATIC_MACH_TYPE
 config MACH_TYPE
 	int "Machine ID number"
 	depends on STATIC_MACH_TYPE
+	default 527 if TARGET_DS109
+	default 1955 if TARGET_NOKIA_RX51
+	default 3036 if TARGET_DS414
+	default 4283 if DEFAULT_DEVICE_TREE = "sun7i-a20-icnova-swac"
 	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
Signature · 1 line
2.20.1
#1 lore raw
Quoted 4 lines · Pali Rohár

For boards which requires correct MACH_TYPE, set their correct default values directly in Kconfig.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom