[PATCH v3 0/2] Coldfire m5441x: add RCM power-on reason driver
Jean-Michel Hautbois <[email protected]>
| Newsgroups | org.kernel.vger.linux-m68k,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <20260617-coldfire-rcm-power-on-reason-v3-0-1a7c7b6b14e7@yoseli.org> |
This series adds a power_on_reason driver for the Freescale ColdFire MCF5441x Reset Controller Module. The MCF5441x has six documented sources of reset (power-on, external pin, software, PLL loss-of-clock, PLL loss-of-lock and core watchdog timeout). They are latched in the Reset Status Register (RSR) at 0xec090001. The new driver decodes that register once at probe time and exposes the result through the power_on_reason sysfs ABI. Patch 1 is the driver. Patch 2 registers the platform device at the SoC level so every MCF5441x board picks the driver up automatically. The driver is scoped to MCF5441x. Other ColdFire variants document an RSR at different addresses with different bit layouts; covering them is left for follow-up patches by anyone with the relevant boards. Tested on a MCF5441x board: after sysrq-b, the sysfs attribute reports "software reset". Signed-off-by: Jean-Michel Hautbois <[email protected]> --- Changes in v3: - power: reset: drop the redundant driver_data initialiser in the platform_device_id table (Uwe Kleine-König). - Link to v2: https://patch.msgid.link/20260607-coldfire-rcm-power-on-reason-v2-0-d0039d8a91e8@yoseli.org Changes in v2: - Describe the RSR layout in the driver instead of a separate m68k header patch, so the driver can be built with COMPILE_TEST. - Allow building under COMPILE_TEST (depends on M5441x || COMPILE_TEST). - Add a platform_device_id table and drop the now-redundant MODULE_ALIAS (Sebastian Reichel). - Drop the standalone "define RSR cause bits" patch; the layout now lives in the driver. The series is two patches instead of three. - Link to v1: https://patch.msgid.link/20260602-coldfire-rcm-power-on-reason-v1-0-fbc3eab0c016@yoseli.org --- Jean-Michel Hautbois (2): power: reset: add MCF5441x RCM power-on reason driver m68k: coldfire/5441x: register mcf-rcm-reset platform device MAINTAINERS | 6 ++ arch/m68k/coldfire/m5441x.c | 25 +++++++ drivers/power/reset/Kconfig | 12 ++++ drivers/power/reset/Makefile | 1 + drivers/power/reset/mcf-rcm-reset.c | 126 ++++++++++++++++++++++++++++++++++++ 5 files changed, 170 insertions(+) --- base-commit: 979c294509f9248fe1e7c358d582fb37dd5ca12d change-id: 20260528-coldfire-rcm-power-on-reason-7a234acfdddd Best regards, -- Jean-Michel Hautbois <[email protected]>