Re: [PATCH v16 03/14] power: reset: reboot-mode: Add support for 64 bit magic
From: Nirmesh Kumar Singh
Date: Wed Oct 15 2025 - 04:40:31 EST
On 10/15/2025 10:08 AM, Shivendra Pratap wrote:
Current reboot-mode supports a single 32-bit argument for any
supported mode. Some reboot-mode based drivers may require
passing two independent 32-bit arguments during a reboot
sequence, for uses-cases, where a mode requires an additional
argument. Such drivers may not be able to use the reboot-mode
driver. For example, ARM PSCI vendor-specific resets, need two
arguments for its operation – reset_type and cookie, to complete
the reset operation. If a driver wants to implement this
firmware-based reset, it cannot use reboot-mode framework.
Introduce 64-bit magic values in reboot-mode driver to
accommodate dual 32-bit arguments when specified via device tree.
In cases, where no second argument is passed from device tree,
keep the upper 32-bit of magic un-changed(0) to maintain backward
compatibility.
Update the current drivers using reboot-mode for a 64-bit magic
value.
Reviewed-by: Umang Chheda <umang.chheda@xxxxxxxxxxxxxxxx>
Signed-off-by: Shivendra Pratap <shivendra.pratap@xxxxxxxxxxxxxxxx>
---
drivers/power/reset/nvmem-reboot-mode.c | 13 +++++++++----
drivers/power/reset/qcom-pon.c | 11 ++++++++---
drivers/power/reset/reboot-mode.c | 19 +++++++++++++------
drivers/power/reset/syscon-reboot-mode.c | 11 ++++++++---
include/linux/reboot-mode.h | 3 ++-
5 files changed, 40 insertions(+), 17 deletions(-)
Reviewed-by: Nirmesh Kumar Singh <nirmesh.singh@xxxxxxxxxxxxxxxx>
Thanks,
Nirmesh