aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Opaniuk2021-04-01 02:01:54 +0300
committerTom Rini2021-04-20 07:31:12 -0400
commit91f00ba2c1c980236ba526b5e8f34e982e7b48d8 (patch)
treec1e915ee8bb5d97f5675adbbf595cc76c8b69ef6
parentb7135b034f9f19a89516bb53535891e14a545395 (diff)
sysreset: psci: use psci driver exported functions
Use psci driver exported functions for reset/poweroff, instead of invoking directly invoke_psci_fn. Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
-rw-r--r--drivers/sysreset/sysreset_psci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/sysreset/sysreset_psci.c b/drivers/sysreset/sysreset_psci.c
index c7907b3226d..83ecbcb9d2c 100644
--- a/drivers/sysreset/sysreset_psci.c
+++ b/drivers/sysreset/sysreset_psci.c
@@ -11,22 +11,18 @@
static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
- unsigned long function_id;
-
switch (type) {
case SYSRESET_WARM:
case SYSRESET_COLD:
- function_id = PSCI_0_2_FN_SYSTEM_RESET;
+ psci_sys_reset(type);
break;
case SYSRESET_POWER_OFF:
- function_id = PSCI_0_2_FN_SYSTEM_OFF;
+ psci_sys_poweroff();
break;
default:
return -ENOSYS;
}
- invoke_psci_fn(function_id, 0, 0, 0);
-
return -EINPROGRESS;
}