Both psci_system_reset and psci_system_off call psci_ops->system_reset,
which seems like a copy-paste error as there is an unused ->system_off
as well.

Adjust psci_system_off to use ->system_off instead. This won't matter
for the existing i.MX7 PSCI implementation because it defines neither
callback, but it will for the upcoming STM32MP PSCI support.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 arch/arm/cpu/psci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c
index 5c662cd0b992..a976ddbb5c65 100644
--- a/arch/arm/cpu/psci.c
+++ b/arch/arm/cpu/psci.c
@@ -138,8 +138,8 @@ static unsigned long psci_system_off(void)
 {
        psci_printf("%s\n", __func__);
 
-       if (psci_ops->system_reset)
-               psci_ops->system_reset();
+       if (psci_ops->system_off)
+               psci_ops->system_off();
 
        while(1);
 
@@ -293,4 +293,4 @@ BAREBOX_CMD_START(smc)
        BAREBOX_CMD_DESC("secure monitor test command")
        BAREBOX_CMD_GROUP(CMD_GRP_MISC)
 BAREBOX_CMD_END
-#endif
\ No newline at end of file
+#endif
-- 
2.20.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to