diff options
author | Ye Li <ye.li@nxp.com> | 2019-04-07 20:35:59 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2019-04-07 22:24:04 -0700 |
commit | 0224af21ce9129722f9f2761c92f8f374f8a14a2 (patch) | |
tree | 8a25f080c194116d781f26201ff0b215a4663a4b /arch/arm/include | |
parent | d4fac7ed7e97ea39d7be0bf3191792cfd4c007cb (diff) |
MLK-21392 imx8: Update SCFW API to v1.7
Sync the SCFW API to with latest commit:
commit 252281d48647caad9a00ff1dd0f1a666c4067653
Author: Chuck Cannon <chuck.cannon@nxp.com>
Date: Fri Apr 5 18:03:13 2019 -0500
SCF-105: Update wiki.
Signed-off-by: Chuck Cannon <chuck.cannon@nxp.com>
Major changes in the update:
1. sc_seco_patch and sc_seco_start_rng are added.
2. sc_misc_get_boot_container is added
3. New resource SC_R_USB_1_PHY
4. Type for 16Mhz frequency
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/mach-imx/sci/rpc.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach-imx/sci/svc/misc/api.h | 15 | ||||
-rw-r--r-- | arch/arm/include/asm/mach-imx/sci/svc/seco/api.h | 49 | ||||
-rw-r--r-- | arch/arm/include/asm/mach-imx/sci/types.h | 3 |
4 files changed, 67 insertions, 2 deletions
diff --git a/arch/arm/include/asm/mach-imx/sci/rpc.h b/arch/arm/include/asm/mach-imx/sci/rpc.h index 845197bec5..5c46855344 100644 --- a/arch/arm/include/asm/mach-imx/sci/rpc.h +++ b/arch/arm/include/asm/mach-imx/sci/rpc.h @@ -20,7 +20,7 @@ /* Defines */ #define SCFW_API_VERSION_MAJOR 1U -#define SCFW_API_VERSION_MINOR 4U +#define SCFW_API_VERSION_MINOR 7U #define SC_RPC_VERSION 1U diff --git a/arch/arm/include/asm/mach-imx/sci/svc/misc/api.h b/arch/arm/include/asm/mach-imx/sci/svc/misc/api.h index 13e2791def..783c54749f 100644 --- a/arch/arm/include/asm/mach-imx/sci/svc/misc/api.h +++ b/arch/arm/include/asm/mach-imx/sci/svc/misc/api.h @@ -509,6 +509,21 @@ void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t *dev); sc_err_t sc_misc_get_boot_type(sc_ipc_t ipc, sc_misc_bt_t *type); /*! + * This function returns the boot container index. + * + * @param[in] ipc IPC handle + * @param[out] idx pointer to return index + * + * Return \a idx = 1 for first container, 2 for second. + * + * @return Returns and error code (SC_ERR_NONE = success). + * + * Return errors code: + * - SC_ERR_UNAVAILABLE if index not passed by ROM + */ +sc_err_t sc_misc_get_boot_container(sc_ipc_t ipc, uint8_t *idx); + +/*! * This function returns the current status of the ON/OFF button. * * @param[in] ipc IPC handle diff --git a/arch/arm/include/asm/mach-imx/sci/svc/seco/api.h b/arch/arm/include/asm/mach-imx/sci/svc/seco/api.h index 529028c5a5..42b9593210 100644 --- a/arch/arm/include/asm/mach-imx/sci/svc/seco/api.h +++ b/arch/arm/include/asm/mach-imx/sci/svc/seco/api.h @@ -38,6 +38,15 @@ #define SC_SECO_AUTH_HDMI_RX_FW 5U /*!< HDMI RX Firmware */ /*@}*/ +/*! + * @name Defines for seco_rng_stat_t + */ +/*@{*/ +#define SC_SECO_RNG_STAT_UNAVAILABLE 0U /*!< Unable to initialize the RNG */ +#define SC_SECO_RNG_STAT_INPROGRESS 1U /*!< Initialization is on-going */ +#define SC_SECO_RNG_STAT_READY 2U /*!< Initialized */ +/*@}*/ + /* Types */ /*! @@ -45,6 +54,11 @@ */ typedef uint8_t sc_seco_auth_cmd_t; +/*! + * This type is used to return the RNG initialization status. + */ +typedef uint32_t sc_seco_rng_stat_t; + /* Functions */ /*! @@ -504,6 +518,41 @@ sc_err_t sc_seco_get_event(sc_ipc_t ipc, uint8_t idx, */ sc_err_t sc_seco_fuse_write(sc_ipc_t ipc, sc_faddr_t addr); +/*! + * This function applies a patch. + * + * @param[in] ipc IPC handle + * @param[in] addr address of message block + * + * @return Returns and error code (SC_ERR_NONE = success). + * + * Return errors codes: + * - SC_ERR_UNAVAILABLE if SECO not available + * + * Note \a addr must be a pointer to a signed message block. + * + * See the Security Reference Manual (SRM) for more info. + */ +sc_err_t sc_seco_patch(sc_ipc_t ipc, sc_faddr_t addr); + +/*! + * This function starts the random number generator. + * + * @param[in] ipc IPC handle + * @param[out] status pointer to return state of RNG + * + * @return Returns and error code (SC_ERR_NONE = success). + * + * Return errors codes: + * - SC_ERR_UNAVAILABLE if SECO not available + * + * The RNG is started automatically after all CPUs are booted. This + * function can be used to start earlier and to check the status. + * + * See the Security Reference Manual (SRM) for more info. + */ +sc_err_t sc_seco_start_rng(sc_ipc_t ipc, sc_seco_rng_stat_t *status); + /* @} */ #endif /* SC_SECO_API_H */ diff --git a/arch/arm/include/asm/mach-imx/sci/types.h b/arch/arm/include/asm/mach-imx/sci/types.h index 5e146c1655..bc5462504e 100644 --- a/arch/arm/include/asm/mach-imx/sci/types.h +++ b/arch/arm/include/asm/mach-imx/sci/types.h @@ -26,6 +26,7 @@ /*@{*/ #define SC_32KHZ 32768U /*!< 32KHz */ #define SC_10MHZ 10000000U /*!< 10MHz */ +#define SC_16MHZ 16000000U /*!< 16MHz */ #define SC_20MHZ 20000000U /*!< 20MHz */ #define SC_25MHZ 25000000U /*!< 25MHz */ #define SC_27MHZ 27000000U /*!< 27MHz */ @@ -205,7 +206,7 @@ #define SC_R_DC_0_BLIT2 21U #define SC_R_DC_0_BLIT_OUT 22U #define SC_R_PERF 23U -#define SC_R_UNUSED5 24U +#define SC_R_USB_1_PHY 24U #define SC_R_DC_0_WARP 25U #define SC_R_UNUSED7 26U #define SC_R_UNUSED8 27U |