diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2019-02-27 15:03:16 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2019-02-27 15:40:35 +0800 |
commit | 974c09d8389989fc75df161d78e932032176ce22 (patch) | |
tree | 8d85e8dd8d0bf13775fafd51f899e3fc4b43edab /drivers/soc | |
parent | a69c26be1f65efa2195e5ca499ae0b148db23d3b (diff) |
MLK-20996 soc: imx: update SCFW APIs
Update SCFW APIs to SCFW commit:
e7a99eb96207 ("SCF-351: Add API to change boot parms.")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/imx/sc/main/rpc.h | 2 | ||||
-rw-r--r-- | drivers/soc/imx/sc/svc/pm/rpc.h | 1 | ||||
-rw-r--r-- | drivers/soc/imx/sc/svc/pm/rpc_clnt.c | 23 |
3 files changed, 25 insertions, 1 deletions
diff --git a/drivers/soc/imx/sc/main/rpc.h b/drivers/soc/imx/sc/main/rpc.h index 6426a67641a7..1215c1b6c56d 100644 --- a/drivers/soc/imx/sc/main/rpc.h +++ b/drivers/soc/imx/sc/main/rpc.h @@ -20,7 +20,7 @@ /* Defines */ #define SCFW_API_VERSION_MAJOR 1U -#define SCFW_API_VERSION_MINOR 2U +#define SCFW_API_VERSION_MINOR 3U #define SC_RPC_VERSION 1U diff --git a/drivers/soc/imx/sc/svc/pm/rpc.h b/drivers/soc/imx/sc/svc/pm/rpc.h index 7585ad3bae99..fe6ac6fe5cad 100644 --- a/drivers/soc/imx/sc/svc/pm/rpc.h +++ b/drivers/soc/imx/sc/svc/pm/rpc.h @@ -44,6 +44,7 @@ #define PM_FUNC_RESET_REASON 10U /* Index for pm_reset_reason() RPC call */ #define PM_FUNC_GET_RESET_PART 26U /* Index for pm_get_reset_part() RPC call */ #define PM_FUNC_BOOT 8U /* Index for pm_boot() RPC call */ +#define PM_FUNC_SET_BOOT_PARM 27U /* Index for pm_set_boot_parm() RPC call */ #define PM_FUNC_REBOOT 9U /* Index for pm_reboot() RPC call */ #define PM_FUNC_REBOOT_PARTITION 12U /* Index for pm_reboot_partition() RPC call */ #define PM_FUNC_REBOOT_CONTINUE 25U /* Index for pm_reboot_continue() RPC call */ diff --git a/drivers/soc/imx/sc/svc/pm/rpc_clnt.c b/drivers/soc/imx/sc/svc/pm/rpc_clnt.c index 640bc93ae414..3170a0d42623 100644 --- a/drivers/soc/imx/sc/svc/pm/rpc_clnt.c +++ b/drivers/soc/imx/sc/svc/pm/rpc_clnt.c @@ -430,6 +430,29 @@ sc_err_t sc_pm_boot(sc_ipc_t ipc, sc_rm_pt_t pt, return (sc_err_t)result; } +sc_err_t sc_pm_set_boot_parm(sc_ipc_t ipc, + sc_rsrc_t resource_cpu, sc_faddr_t boot_addr, + sc_rsrc_t resource_mu, sc_rsrc_t resource_dev) +{ + sc_rpc_msg_t msg; + uint8_t result; + + RPC_VER(&msg) = SC_RPC_VERSION; + RPC_SVC(&msg) = U8(SC_RPC_SVC_PM); + RPC_FUNC(&msg) = U8(PM_FUNC_SET_BOOT_PARM); + RPC_U32(&msg, 0U) = U32(boot_addr >> 32ULL); + RPC_U32(&msg, 4U) = U32(boot_addr); + RPC_U16(&msg, 8U) = U16(resource_cpu); + RPC_U16(&msg, 10U) = U16(resource_mu); + RPC_U16(&msg, 12U) = U16(resource_dev); + RPC_SIZE(&msg) = 5U; + + sc_call_rpc(ipc, &msg, SC_FALSE); + + result = RPC_R8(&msg); + return (sc_err_t) result; +} + void sc_pm_reboot(sc_ipc_t ipc, sc_pm_reset_type_t type) { sc_rpc_msg_t msg; |