firmware: rockchip_sip: support hdcp controller load key

Providing a interface for hdcp controller to load key.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I205c54e2ce1abc394761fc49724b76b25b2947bf
This commit is contained in:
Zhang Yubing
2022-06-10 17:00:33 +08:00
committed by Tao Huang
parent 8d772bd5d5
commit 39148dad2a
2 changed files with 18 additions and 0 deletions

View File

@@ -594,6 +594,16 @@ int sip_wdt_config(u32 sub_func, u32 arg1, u32 arg2, u32 arg3)
}
EXPORT_SYMBOL_GPL(sip_wdt_config);
int sip_hdcpkey_init(u32 hdcp_id)
{
struct arm_smccc_res res;
res = __invoke_sip_fn_smc(TRUSTED_OS_HDCPKEY_INIT, hdcp_id, 0, 0);
return res.a0;
}
EXPORT_SYMBOL_GPL(sip_hdcpkey_init);
/******************************************************************************/
#ifdef CONFIG_ARM
static __init int sip_firmware_init(void)

View File

@@ -56,6 +56,8 @@
#define SIP_HDCP_CONFIG 0x82000025
#define SIP_WDT_CFG 0x82000026
#define TRUSTED_OS_HDCPKEY_INIT 0xB7000003
/* Rockchip Sip version */
#define SIP_IMPLEMENT_V1 (1)
#define SIP_IMPLEMENT_V2 (2)
@@ -233,6 +235,7 @@ int sip_fiq_debugger_is_enabled(void);
int sip_fiq_debugger_sdei_get_event_id(u32 *fiq, u32 *sw_cpu, u32 *flag);
int sip_fiq_control(u32 sub_func, u32 irq, unsigned long data);
int sip_wdt_config(u32 sub_func, u32 arg1, u32 arg2, u32 arg3);
int sip_hdcpkey_init(u32 hdcp_id);
#else
static inline struct arm_smccc_res sip_smc_get_atf_version(void)
{
@@ -365,6 +368,11 @@ static inline int sip_wdt_config(u32 sub_func,
{
return 0;
}
static inline int sip_hdcpkey_init(u32 hdcp_id)
{
return 0;
}
#endif
/* 32-bit OP-TEE context, never change order of members! */