From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 24/27] ARM: pxa: move over to MULTIARCH
Date: Sun, 16 Aug 2026 19:56:44 +0200 [thread overview]
Message-ID: <20260816-pxa3xx-v1-24-f3c3d7a6c43f@pengutronix.de> (raw)
In-Reply-To: <20260816-pxa3xx-v1-0-f3c3d7a6c43f@pengutronix.de>
PXA was one of the architectures left in the "ARM system type" choice,
so a build could contain it or another architecture, never both.
Nothing about the SoC support requires that anymore, but its initcalls
did: the restart handler and the poweroff handler were registered
unconditionally and go straight at PXA registers, which on a multiarch
build would run on whatever else is in the image. Guard both with
of_machine_is_compatible() and move the architecture out of the choice.
For that to work the board has to identify as a PXA3xx. The SoC device
tree include says so, but a board that overrides the root compatible has
to keep it in its list.
While at it, drop the separate device_initcall() for
pxa_detect_reset_source(): pxa3xx_init() already calls it, so the reset
source was detected twice.
Assisted-by: Claude Opus 5
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 16 ++++++++--------
arch/arm/mach-pxa/common.c | 4 ++++
arch/arm/mach-pxa/pxa3xx.c | 6 ++++--
3 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 106f3d559e..6a4825fe33 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -118,14 +118,6 @@ config ARCH_MXS
select COMMON_CLK
select HAS_DEBUG_LL
-config ARCH_PXA
- bool "Intel/Marvell PXA based"
- depends on 32BIT
- select GPIOLIB
- select HAS_DEBUG_LL
- select OFTREE
- select OFDEVICE
-
config ARCH_SOCFPGA
bool "Altera SOCFPGA"
select HAS_DEBUG_LL
@@ -188,6 +180,14 @@ config ARCH_K3
select COMMON_CLK_OF_PROVIDER
select PM_GENERIC_DOMAINS
+config ARCH_PXA
+ bool "Intel/Marvell PXA based"
+ depends on 32BIT
+ select GPIOLIB
+ select HAS_DEBUG_LL
+ select OFTREE
+ select OFDEVICE
+
config ARCH_SUNXI
bool "Allwinner (sunxi) SoCs"
depends on ARCH_MULTIARCH
diff --git a/arch/arm/mach-pxa/common.c b/arch/arm/mach-pxa/common.c
index 1da1b58054..fea570c5fa 100644
--- a/arch/arm/mach-pxa/common.c
+++ b/arch/arm/mach-pxa/common.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
+#include <of.h>
#include <init.h>
#include <restart.h>
#include <mach/pxa/pxa-regs.h>
@@ -42,6 +43,9 @@ static void __noreturn pxa_restart_soc(struct restart_handler *rst,
static int restart_register_feature(void)
{
+ if (!of_machine_is_compatible("marvell,pxa3xx"))
+ return 0;
+
restart_handler_register_fn("soc-wdt", pxa_restart_soc);
return 0;
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index ea84efc8b0..6edc55481e 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
+#include <of.h>
#include <init.h>
#include <poweroff.h>
#include <reset_source.h>
@@ -47,8 +48,6 @@ void pxa_clear_reset_source(void)
ARSR = ARSR_GPR | ARSR_LPMR | ARSR_WDT | ARSR_HWR;
}
-device_initcall(pxa_detect_reset_source);
-
static void __noreturn pxa3xx_poweroff(struct poweroff_handler *handler,
unsigned long flags)
{
@@ -62,6 +61,9 @@ static void __noreturn pxa3xx_poweroff(struct poweroff_handler *handler,
static int pxa3xx_init(void)
{
+ if (!of_machine_is_compatible("marvell,pxa3xx"))
+ return 0;
+
poweroff_handler_register_fn(pxa3xx_poweroff);
pxa_detect_reset_source();
--
2.47.3
next prev parent reply other threads:[~2026-08-16 18:02 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 17:56 [PATCH 00/27] ARM: Add pxa3xx and Raumfeld Speaker support Sascha Hauer
2026-08-16 17:56 ` [PATCH 01/27] ARM: pxa: remove PXA25x and PXA27x support Sascha Hauer
2026-08-16 17:56 ` [PATCH 02/27] video: remove the PXA framebuffer driver Sascha Hauer
2026-08-16 17:56 ` [PATCH 03/27] ARM: cache: drive the XSC3 cache with the ARMv4 functions Sascha Hauer
2026-08-16 17:56 ` [PATCH 04/27] mci: pxamci: get the clock from the clk API Sascha Hauer
2026-08-16 17:56 ` [PATCH 05/27] pwm: pxa: " Sascha Hauer
2026-08-16 17:56 ` [PATCH 06/27] serial: " Sascha Hauer
2026-08-16 17:56 ` [PATCH 07/27] clk: pxa: add a device tree clock driver for PXA3xx Sascha Hauer
2026-08-16 17:56 ` [PATCH 08/27] mtd: nand: nand_mrvl_nfc: honour marvell,nand-keep-config Sascha Hauer
2026-08-16 17:56 ` [PATCH 09/27] mtd: nand: nand_mrvl_nfc: support the nand-controller bindings Sascha Hauer
2026-08-16 17:56 ` [PATCH 10/27] mtd: nand: mrvl_nfc: keep the ready latch across a STATUS command Sascha Hauer
2026-08-16 17:56 ` [PATCH 11/27] mtd: nand: mrvl_nfc: do not report a command timeout as an error Sascha Hauer
2026-08-16 17:56 ` [PATCH 12/27] mci: pxamci: probe from the device tree Sascha Hauer
2026-08-16 17:56 ` [PATCH 13/27] serial: pxa: add device tree support Sascha Hauer
2026-08-16 17:56 ` [PATCH 14/27] serial: pxa: provide the Linux console name Sascha Hauer
2026-08-16 17:56 ` [PATCH 15/27] gpio: pxa: add a driver and switch the architecture to GPIOLIB Sascha Hauer
2026-08-16 17:56 ` [PATCH 16/27] ARM: pxa: add DEBUG_LL support Sascha Hauer
2026-08-16 17:56 ` [PATCH 17/27] ARM: pxa: let the board select the SoC Sascha Hauer
2026-08-16 17:56 ` [PATCH 18/27] ARM: pxa: enable device tree support Sascha Hauer
2026-08-16 17:56 ` [PATCH 19/27] scripts: add pxa-image Sascha Hauer
2026-08-16 17:56 ` [PATCH 20/27] ARM: pxa: add a NAND first stage loader Sascha Hauer
2026-08-16 17:56 ` [PATCH 21/27] filetype: detect PXA3xx NTIM images Sascha Hauer
2026-08-16 17:56 ` [PATCH 22/27] ARM: pxa: add a barebox update handler for NAND Sascha Hauer
2026-08-16 17:56 ` [PATCH 23/27] clocksource: add a driver for the PXA OS timer and its watchdog Sascha Hauer
2026-08-16 17:56 ` Sascha Hauer [this message]
2026-08-16 17:56 ` [PATCH 25/27] ARM: pxa: reset straight away and without complaining Sascha Hauer
2026-08-16 17:56 ` [PATCH 26/27] ARM: pxa: add Raumfeld Speaker board support Sascha Hauer
2026-08-16 17:56 ` [PATCH 27/27] ARM: multi_v5_v6_defconfig: enable PXA support Sascha Hauer
2026-08-17 7:35 ` [PATCH 00/27] ARM: Add pxa3xx and Raumfeld Speaker support Ahmad Fatoum
2026-08-19 9:26 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260816-pxa3xx-v1-24-f3c3d7a6c43f@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox