summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-09-11 05:59:01 -0500
committerYe Li <ye.li@nxp.com>2017-09-12 20:57:15 -0500
commit1dd249381d5fdfb5fa4f2c10e6445ba0677001bb (patch)
tree7d89fc5a79d7488a767a85311462e2d235883402
parent2f355e42f80666d465bd2320f12826830b5fb3b9 (diff)
MLK-16441-1 imx8qm/qxp: Update scfw api
Update SCFW API to latest commit 45c567e830b2b915982ea5f2fcd60d235991a415 which contains new API to get build info for SCFW. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r--arch/arm/imx-common/sci/svc/misc/rpc.h1
-rw-r--r--arch/arm/imx-common/sci/svc/misc/rpc_clnt.c19
-rw-r--r--arch/arm/include/asm/imx-common/sci/svc/misc/api.h10
-rw-r--r--arch/arm/include/asm/imx-common/sci/types.h3
4 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/imx-common/sci/svc/misc/rpc.h b/arch/arm/imx-common/sci/svc/misc/rpc.h
index 5455c33721..2840cb1a84 100644
--- a/arch/arm/imx-common/sci/svc/misc/rpc.h
+++ b/arch/arm/imx-common/sci/svc/misc/rpc.h
@@ -35,6 +35,7 @@ typedef enum misc_func_e
MISC_FUNC_SECO_AUTHENTICATE = 9, /*!< Index for misc_seco_authenticate() RPC call */
MISC_FUNC_DEBUG_OUT = 10, /*!< Index for misc_debug_out() RPC call */
MISC_FUNC_WAVEFORM_CAPTURE = 6, /*!< Index for misc_waveform_capture() RPC call */
+ MISC_FUNC_BUILD_INFO = 15, /*!< Index for misc_build_info() RPC call */
MISC_FUNC_SET_ARI = 3, /*!< Index for misc_set_ari() RPC call */
MISC_FUNC_BOOT_STATUS = 7, /*!< Index for misc_boot_status() RPC call */
MISC_FUNC_BOOT_DONE = 14, /*!< Index for misc_boot_done() RPC call */
diff --git a/arch/arm/imx-common/sci/svc/misc/rpc_clnt.c b/arch/arm/imx-common/sci/svc/misc/rpc_clnt.c
index a18c9b3e21..25f8b09c67 100644
--- a/arch/arm/imx-common/sci/svc/misc/rpc_clnt.c
+++ b/arch/arm/imx-common/sci/svc/misc/rpc_clnt.c
@@ -178,6 +178,25 @@ sc_err_t sc_misc_waveform_capture(sc_ipc_t ipc, bool enable)
return (sc_err_t) result;
}
+void sc_misc_build_info(sc_ipc_t ipc, uint32_t *build,
+ uint32_t *commit)
+{
+ sc_rpc_msg_t msg;
+
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SVC(&msg) = SC_RPC_SVC_MISC;
+ RPC_FUNC(&msg) = MISC_FUNC_BUILD_INFO;
+ RPC_SIZE(&msg) = 1;
+
+ sc_call_rpc(ipc, &msg, false);
+
+ if (build != NULL)
+ *build = RPC_U32(&msg, 0);
+ if (commit != NULL)
+ *commit = RPC_U32(&msg, 4);
+ return;
+}
+
sc_err_t sc_misc_set_ari(sc_ipc_t ipc, sc_rsrc_t resource,
sc_rsrc_t resource_mst, uint16_t ari, bool enable)
{
diff --git a/arch/arm/include/asm/imx-common/sci/svc/misc/api.h b/arch/arm/include/asm/imx-common/sci/svc/misc/api.h
index 38935ddb39..cc42af56e6 100644
--- a/arch/arm/include/asm/imx-common/sci/svc/misc/api.h
+++ b/arch/arm/include/asm/imx-common/sci/svc/misc/api.h
@@ -249,6 +249,16 @@ void sc_misc_debug_out(sc_ipc_t ipc, uint8_t ch);
*/
sc_err_t sc_misc_waveform_capture(sc_ipc_t ipc, bool enable);
+/*!
+ * This function is used to return the SCFW build info.
+ *
+ * @param[in] ipc IPC handle
+ * @param[out] build pointer to return build number
+ * @param[out] commit pointer to return commit ID (git SHA-1)
+ */
+void sc_misc_build_info(sc_ipc_t ipc, uint32_t *build,
+ uint32_t *commit);
+
/* @} */
/*!
diff --git a/arch/arm/include/asm/imx-common/sci/types.h b/arch/arm/include/asm/imx-common/sci/types.h
index af7f1cbb6d..c7ad6e5581 100644
--- a/arch/arm/include/asm/imx-common/sci/types.h
+++ b/arch/arm/include/asm/imx-common/sci/types.h
@@ -26,6 +26,7 @@
#define SC_10MHZ 10000000 /*!< 10MHz */
#define SC_20MHZ 20000000 /*!< 20MHz */
#define SC_25MHZ 25000000 /*!< 25MHz */
+#define SC_27MHZ 27000000 /*!< 27MHz */
#define SC_40MHZ 40000000 /*!< 40MHz */
#define SC_45MHZ 45000000 /*!< 45MHz */
#define SC_50MHZ 50000000 /*!< 50MHz */
@@ -89,6 +90,7 @@
#define SC_24MHZ 24000000 /*!< 24MHz */
#define SC_120MHZ 120000000 /*!< 120MHz */
#define SC_132MHZ 132000000 /*!< 132MHz */
+#define SC_144MHZ 144000000 /*!< 144MHz */
#define SC_192MHZ 192000000 /*!< 192MHz */
#define SC_211MHZ 211200000 /*!< 211.2MHz */
#define SC_240MHZ 240000000 /*!< 240MHz */
@@ -101,6 +103,7 @@
#define SC_600MHZ 600000000 /*!< 600MHz */
#define SC_744MHZ 744000000 /*!< 744MHz */
#define SC_792MHZ 792000000 /*!< 792MHz */
+#define SC_864MHZ 864000000 /*!< 864MHz */
#define SC_960MHZ 960000000 /*!< 960MHz */
#define SC_1056MHZ 1056000000 /*!< 1056MHz */
#define SC_1200MHZ 1200000000 /*!< 1.2GHz */