Re: [PATCH] ARM: lpc32xx: only run arch_initcalls on LPC32xx hardware
From: Arnd Bergmann
Date: Sun Jul 12 2026 - 17:07:01 EST
On Sun, Jul 12, 2026, at 22:56, Karl Mehltretter wrote:
> lpc32xx_check_uid() and lpc32xx_pm_init() are arch_initcalls that poke
> LPC32xx-only registers (the CLKPWR unique-ID and the EMC control
> register). Since the multiplatform conversion they also run on other
> ARCH_MULTI_V5 boards, where the access faults, e.g. on versatile:
>
> Unable to handle kernel paging request at virtual address f4004130
> PC is at lpc32xx_check_uid+0x2c/0x9c
>
> Bail out of both unless we are running on an LPC32xx SoC, reusing the
> machine's DT_MACHINE compatible list so the guard can't drift from it.
>
> Fixes: 75bf1bd7d2f9 ("ARM: lpc32xx: allow multiplatform build")
> Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>
Hi Karl,
This fix looks correct to me, but I think it would be better
to replace the arch_initcall() entries with a direct function
call from lpc3250_machine_init(), which also runs at the
arch_initcall level and is already guarded properly.
The calls should be entered in link order, which would
mean common.c, pm.c, phy3250.c.
Arnd