diff options
| author | Tom Rini <[email protected]> | 2024-02-08 09:37:16 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-02-08 09:37:16 -0500 |
| commit | 2b51069b7c5a8331ed4a6eb641e66466f062b06a (patch) | |
| tree | a756d71839bccea091f809891ad86ab3c0192abe /drivers | |
| parent | a7fb2f57ad5039e287ffbffe30a6af0729aaa721 (diff) | |
| parent | 8dcf1df48dff339b172d1bce2a38a965ee4aafca (diff) | |
Merge tag 'u-boot-imx-master-20240208' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
- Add USB support for phycore-imx8mp
- Fix environment corruption, reset on mx6sabresd
- Print reset cause on imx8
- Extend mkimage to support generating an image for i.MXRT FlexSPI
- Add new apalis and colibri variants
- Add support for phyBOARD-Segin-i.MX93 support
- Fix when FEC is primarily used instead of EQOS on i.MX93.
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/misc/imx8/scu_api.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c index 3e3002ba6df..6e2c678e614 100644 --- a/drivers/misc/imx8/scu_api.c +++ b/drivers/misc/imx8/scu_api.c @@ -882,6 +882,28 @@ void sc_pm_reboot(sc_ipc_t ipc, sc_pm_reset_type_t type) misc_call(dev, SC_TRUE, &msg, size, &msg, size); } +int sc_pm_reset_reason(sc_ipc_t ipc, sc_pm_reset_reason_t *reason) +{ + struct udevice *dev = gd->arch.scu_dev; + struct sc_rpc_msg_s msg; + int size = sizeof(struct sc_rpc_msg_s); + int ret; + + RPC_VER(&msg) = SC_RPC_VERSION; + RPC_SVC(&msg) = (u8)SC_RPC_SVC_PM; + RPC_FUNC(&msg) = (u8)PM_FUNC_RESET_REASON; + RPC_SIZE(&msg) = 1U; + + ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); + if (ret) + printf("%s: res:%d\n", __func__, RPC_U8(&msg, 0U)); + + if (reason) + *reason = RPC_U8(&msg, 0U); + + return ret; +} + int sc_pm_get_resource_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_power_mode_t *mode) { |
