aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/psci/psci.c
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-01-12 15:50:28 +0000
committersaturneric <[email protected]>2025-01-12 15:50:28 +0000
commitb7c94eb866dd341a28367bdfabd7c2d1b14d688e (patch)
treeb6df897425af99dbfef5ad4d91a969f1e58fdae6 /drivers/firmware/psci/psci.c
parentMerge tag 'hwmon-for-v6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadkernel-b7c94eb866dd341a28367bdfabd7c2d1b14d688e.tar.gz
kernel-b7c94eb866dd341a28367bdfabd7c2d1b14d688e.zip
fix: drivers patch make raspberry pi 5 work properly
Diffstat (limited to 'drivers/firmware/psci/psci.c')
-rw-r--r--drivers/firmware/psci/psci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index a1ebbe9b73b1..22bb25bbbf18 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -316,7 +316,14 @@ static int psci_sys_reset(struct notifier_block *nb, unsigned long action,
* reset_type[30:0] = 0 (SYSTEM_WARM_RESET)
* cookie = 0 (ignored by the implementation)
*/
- invoke_psci_fn(PSCI_FN_NATIVE(1_1, SYSTEM_RESET2), 0, 0, 0);
+ // Allow extra arguments separated by spaces after
+ // the partition number.
+ unsigned long val;
+ u8 partition = 0;
+
+ if (data && sscanf(data, "%lu", &val) == 1 && val < 63)
+ partition = val;
+ invoke_psci_fn(PSCI_FN_NATIVE(1_1, SYSTEM_RESET2), 0, partition, 0);
} else {
invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
}