Browse Source

MLK-16441-1 imx8qm/qxp: Update scfw api

Update SCFW API to latest commit 45c567e830
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>
(cherry picked from commit 1dd249381d)
Ye Li 3 years ago
parent
commit
c35346e966
4 changed files with 33 additions and 0 deletions
  1. +1
    -0
      arch/arm/imx-common/sci/svc/misc/rpc.h
  2. +19
    -0
      arch/arm/imx-common/sci/svc/misc/rpc_clnt.c
  3. +10
    -0
      arch/arm/include/asm/imx-common/sci/svc/misc/api.h
  4. +3
    -0
      arch/arm/include/asm/imx-common/sci/types.h

+ 1
- 0
arch/arm/imx-common/sci/svc/misc/rpc.h View File

@ -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 */


+ 19
- 0
arch/arm/imx-common/sci/svc/misc/rpc_clnt.c View File

@ -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)
{


+ 10
- 0
arch/arm/include/asm/imx-common/sci/svc/misc/api.h View File

@ -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);
/* @} */
/*!


+ 3
- 0
arch/arm/include/asm/imx-common/sci/types.h View File

@ -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 */


Loading…
Cancel
Save