mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
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>
This commit is contained in:
parent
b7135b034f
commit
91f00ba2c1
|
@ -11,22 +11,18 @@
|
||||||
|
|
||||||
static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
|
static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
|
||||||
{
|
{
|
||||||
unsigned long function_id;
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SYSRESET_WARM:
|
case SYSRESET_WARM:
|
||||||
case SYSRESET_COLD:
|
case SYSRESET_COLD:
|
||||||
function_id = PSCI_0_2_FN_SYSTEM_RESET;
|
psci_sys_reset(type);
|
||||||
break;
|
break;
|
||||||
case SYSRESET_POWER_OFF:
|
case SYSRESET_POWER_OFF:
|
||||||
function_id = PSCI_0_2_FN_SYSTEM_OFF;
|
psci_sys_poweroff();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
invoke_psci_fn(function_id, 0, 0, 0);
|
|
||||||
|
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user