rockchip: smccc: add sip_smc_amp_cfg()

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ida367c95f72e910f6dbb9919888479250512f3b4
This commit is contained in:
Joseph Chen 2021-02-03 18:36:20 +08:00 committed by Jianhong Chen
parent 52ee18acb8
commit c3e08fa050
2 changed files with 17 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#define SIP_VPU_RESET 0x8200000c
#define SIP_SOC_BUS_DIV 0x8200000d
#define SIP_LAST_LOG 0x8200000e
#define SIP_AMP_CFG 0x82000022
#define ROCKCHIP_SIP_CONFIG_DRAM_INIT 0x00
#define ROCKCHIP_SIP_CONFIG_DRAM_SET_RATE 0x01
@ -56,6 +57,9 @@
#define SECURE_REG_RD 0x0
#define SECURE_REG_WR 0x1
/* SIP_AMP_CFG */
#define AMP_PE_STATE 0x0
/* Share mem page types */
typedef enum {
SHARE_PAGE_TYPE_INVALID = 0,
@ -73,6 +77,11 @@ int sip_smc_set_suspend_mode(unsigned long ctrl,
unsigned long config1,
unsigned long config2);
/*
* sip_smc_amp_cfg() - config AMP
*/
int sip_smc_amp_cfg(unsigned long func, unsigned long arg0, unsigned long arg1);
/*
* sip_smc_dram() - Set dram configure for trust.
*

View File

@ -61,6 +61,14 @@ int sip_smc_set_suspend_mode(unsigned long ctrl,
return res.a0;
}
int sip_smc_amp_cfg(unsigned long func, unsigned long arg0, unsigned long arg1)
{
struct arm_smccc_res res;
res = __invoke_sip_fn_smc(SIP_AMP_CFG, func, arg0, arg1);
return res.a0;
}
struct arm_smccc_res sip_smc_dram(unsigned long arg0,
unsigned long arg1,
unsigned long arg2)