The patch removes the dependency on <asm/mach-types.h> in the decompressor
for EP93xx-based boards that no longer have legacy board files. This is a
preparatory step for cleaning up a large number of stale entries in
mach-types.

Link: https://lore.kernel.org/all/20260509223820.50347-1-enelsonmoore@gmail.com/

* tag 'ep93xx-20260529' of https://git.kernel.org/pub/scm/linux/kernel/git/asv/linux:
  arm: boot: ep93xx: don't rely on machine_is_*() for removed board files

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2026-05-30 00:42:42 +02:00
commit 30b1e0a47a
No known key found for this signature in database
GPG Key ID: 9A6C79EFE60018D9

View 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())