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 <jeanmichel.hautbois@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 <jeanmichel.hautbois@yoseli.org>