]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: reset: syscon-reboot: add gs101-specific reset
authorAndré Draszik <andre.draszik@linaro.org>
Tue, 1 Apr 2025 10:11:03 +0000 (11:11 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 30 Apr 2025 22:41:31 +0000 (00:41 +0200)
commit8c7cf0fc8cf5f5dee66d767655e06e190e6f2881
tree628c61683e18a67c38163c368c9c6018a4431d0c
parent1495c1aa4447f64c1e2209a95b201cb6452bb775
power: reset: syscon-reboot: add gs101-specific reset

Linux supports a couple different reset modes, but this driver here
doesn't distinguish between them and issues the same syscon register
write irrespective of the reset mode requested by the kernel.

Since DTs should not encode register writes (see e.g. [1]), update this
driver to support different reset modes based on DT compatible match.

At the same time, add support for Google GS101, which does support
cold, hard, warm, and soft.

As an example why this is useful, other than properly supporting the
Linux reboot= kernel command line option or sysfs entry, this change
allows gs101-platforms to default to a more secure cold-reset, but also
to warm-reset in case RAM contents needs to be retained across the
reset.

Link: https://lore.kernel.org/all/20250227132644.GA1924628-robh@kernel.org/
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250401-syscon-reboot-reset-mode-v5-2-5b9357442363@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/reset/syscon-reboot.c