diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2019-02-15 13:41:25 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2019-02-15 16:52:49 +0800 |
commit | 54ef9c39548d5aaa2044dc696fecbc34905572ce (patch) | |
tree | 24274801955055f1b5e663f6e71a95fc72987e76 /drivers/soc | |
parent | a3e079585f3bfcddcd9be4b7eb588c7e6eb930bd (diff) |
MLK-20930-2 soc: imx: update SCFW APIs
Update SCFW APIs to SCFW commit:
004247e14afc ("SCF-341 Fix bug in setting large slice clock divider")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 89add27a115c3b378d7151299b2919c14a1427ef)
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/imx/sc/main/rpc.h | 3 | ||||
-rw-r--r-- | drivers/soc/imx/sc/svc/misc/rpc.h | 1 | ||||
-rw-r--r-- | drivers/soc/imx/sc/svc/misc/rpc_clnt.c | 25 |
3 files changed, 29 insertions, 0 deletions
diff --git a/drivers/soc/imx/sc/main/rpc.h b/drivers/soc/imx/sc/main/rpc.h index ca20613d19a0..6426a67641a7 100644 --- a/drivers/soc/imx/sc/main/rpc.h +++ b/drivers/soc/imx/sc/main/rpc.h @@ -19,6 +19,9 @@ /* Defines */ +#define SCFW_API_VERSION_MAJOR 1U +#define SCFW_API_VERSION_MINOR 2U + #define SC_RPC_VERSION 1U #define SC_RPC_MAX_MSG 8U diff --git a/drivers/soc/imx/sc/svc/misc/rpc.h b/drivers/soc/imx/sc/svc/misc/rpc.h index cec8791a5fc0..c31d193121ff 100644 --- a/drivers/soc/imx/sc/svc/misc/rpc.h +++ b/drivers/soc/imx/sc/svc/misc/rpc.h @@ -45,6 +45,7 @@ #define MISC_FUNC_DEBUG_OUT 10U /* Index for misc_debug_out() RPC call */ #define MISC_FUNC_WAVEFORM_CAPTURE 6U /* Index for misc_waveform_capture() RPC call */ #define MISC_FUNC_BUILD_INFO 15U /* Index for misc_build_info() RPC call */ +#define MISC_FUNC_API_VER 35U /* Index for misc_api_ver() RPC call */ #define MISC_FUNC_UNIQUE_ID 19U /* Index for misc_unique_id() RPC call */ #define MISC_FUNC_SET_ARI 3U /* Index for misc_set_ari() RPC call */ #define MISC_FUNC_BOOT_STATUS 7U /* Index for misc_boot_status() RPC call */ diff --git a/drivers/soc/imx/sc/svc/misc/rpc_clnt.c b/drivers/soc/imx/sc/svc/misc/rpc_clnt.c index faffbd75c27d..257264d394b6 100644 --- a/drivers/soc/imx/sc/svc/misc/rpc_clnt.c +++ b/drivers/soc/imx/sc/svc/misc/rpc_clnt.c @@ -429,6 +429,31 @@ void sc_misc_build_info(sc_ipc_t ipc, uint32_t *build, *commit = RPC_U32(&msg, 4U); } +void sc_misc_api_ver(sc_ipc_t ipc, uint16_t *cl_maj, + uint16_t *cl_min, uint16_t *sv_maj, uint16_t *sv_min) +{ + sc_rpc_msg_t msg; + + RPC_VER(&msg) = SC_RPC_VERSION; + RPC_SVC(&msg) = U8(SC_RPC_SVC_MISC); + RPC_FUNC(&msg) = U8(MISC_FUNC_API_VER); + RPC_SIZE(&msg) = 1U; + + sc_call_rpc(ipc, &msg, SC_FALSE); + + if (cl_maj != NULL) + *cl_maj = SCFW_API_VERSION_MAJOR; + + if (cl_min != NULL) + *cl_min = SCFW_API_VERSION_MINOR; + + if (sv_maj != NULL) + *sv_maj = RPC_U16(&msg, 4U); + + if (sv_min != NULL) + *sv_min = RPC_U16(&msg, 6U); +} + void sc_misc_unique_id(sc_ipc_t ipc, uint32_t *id_l, uint32_t *id_h) { |