]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm: boot: ep93xx: don't rely on machine_is_*() for removed board files
authorEthan Nelson-Moore <enelsonmoore@gmail.com>
Sat, 9 May 2026 22:38:19 +0000 (15:38 -0700)
committerAlexander Sverdlin <alexander.sverdlin@gmail.com>
Thu, 28 May 2026 22:21:38 +0000 (00:21 +0200)
Code in misc-ep93xx.h relies on machine_is_*() macros for several
boards that no longer have legacy board files. They were removed in
commit e5ef574dda70 ("ARM: ep93xx: delete all boardfiles"). This
prevents the removal of machine IDs no longer used by the kernel from
mach-types. To resolve this issue, create local copies of these macros.
(The checks themselves are still valid because the IDs are still passed
in by the bootloader on these machines.) Also take the opportunity to
remove three repeated checks for the same ID.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Alexander Sverdlin <asv@kernel.org>
arch/arm/boot/compressed/misc-ep93xx.h

index 65b4121d14904abd49eb9a9142f84a0c92fd3fc0..b0a1b42aab317faedd2617a4536a51ddf7030f9b 100644 (file)
@@ -3,7 +3,22 @@
  * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
  */
 
-#include <asm/mach-types.h>
+/*
+ * These machine IDs are no longer used by the kernel since EP93xx was converted
+ * to DT booting, but they are still passed in by bootloaders, so we use our own
+ * local definitions of the relevant macros.
+ */
+#define machine_is_bk3()               (__machine_arch_type == 1880)
+#define machine_is_edb9301()           (__machine_arch_type == 462)
+#define machine_is_edb9302a()          (__machine_arch_type == 1127)
+#define machine_is_edb9302()           (__machine_arch_type == 538)
+#define machine_is_edb9307a()          (__machine_arch_type == 1128)
+#define machine_is_edb9307()           (__machine_arch_type == 607)
+#define machine_is_edb9312()           (__machine_arch_type == 451)
+#define machine_is_edb9315a()          (__machine_arch_type == 772)
+#define machine_is_edb9315()           (__machine_arch_type == 463)
+#define machine_is_ts72xx()            (__machine_arch_type == 673)
+#define machine_is_vision_ep9307()     (__machine_arch_type == 1578)
 
 static inline unsigned int __raw_readl(unsigned int ptr)
 {
@@ -60,14 +75,11 @@ static inline void ep93xx_decomp_setup(void)
        if (machine_is_edb9301() ||
            machine_is_edb9302() ||
            machine_is_edb9302a() ||
-           machine_is_edb9302a() ||
            machine_is_edb9307() ||
            machine_is_edb9307a() ||
-           machine_is_edb9307a() ||
            machine_is_edb9312() ||
            machine_is_edb9315() ||
            machine_is_edb9315a() ||
-           machine_is_edb9315a() ||
            machine_is_ts72xx() ||
            machine_is_bk3() ||
            machine_is_vision_ep9307())