firmware: rockchip_sip: support access mem_os_reg
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com> Change-Id: Ic28ea22e37a03dcc4e930320ac59992affd5e765
This commit is contained in:
parent
14a361a75b
commit
f056cfd8cd
2 changed files with 31 additions and 0 deletions
|
|
@ -264,6 +264,22 @@ struct arm_smccc_res sip_smc_lastlog_request(void)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(sip_smc_lastlog_request);
|
||||
|
||||
int sip_smc_access_mem_os_reg(u32 func, u32 id, u32 *val)
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
|
||||
if (val == NULL)
|
||||
return SIP_RET_INVALID_PARAMS;
|
||||
|
||||
res = __invoke_sip_fn_smc(SIP_ACCESS_MEM_OS_REG, func, id, *val);
|
||||
|
||||
if (func == RK_MEM_OS_REG_READ)
|
||||
*val = res.a1;
|
||||
|
||||
return res.a0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sip_smc_access_mem_os_reg);
|
||||
|
||||
int sip_smc_amp_config(u32 sub_func_id, u32 arg1, u32 arg2, u32 arg3)
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#define PSCI_SIP_VPU_RESET 0x8200000c
|
||||
#define SIP_BUS_CFG 0x8200000d
|
||||
#define SIP_LAST_LOG 0x8200000e
|
||||
#define SIP_ACCESS_MEM_OS_REG 0x8200000f
|
||||
#define SIP_SCMI_AGENT0 0x82000010
|
||||
#define SIP_SCMI_AGENT1 0x82000011
|
||||
#define SIP_SCMI_AGENT2 0x82000012
|
||||
|
|
@ -120,6 +121,12 @@
|
|||
/* wakeup state */
|
||||
#define REMOTECTL_PWRKEY_WAKEUP 0xdeadbeaf
|
||||
|
||||
/* SIP_ACCESS_MEM_OS_REG child configs */
|
||||
enum {
|
||||
RK_MEM_OS_REG_READ = 0,
|
||||
RK_MEM_OS_REG_WRITE,
|
||||
};
|
||||
|
||||
/* SIP_MCU_CFG child configs, MCU ID */
|
||||
enum {
|
||||
RK_BUS_MCU,
|
||||
|
|
@ -262,6 +269,7 @@ int sip_smc_secure_reg_write(u32 addr_phy, u32 val);
|
|||
u32 sip_smc_secure_reg_read(u32 addr_phy);
|
||||
struct arm_smccc_res sip_smc_bus_config(u32 arg0, u32 arg1, u32 arg2);
|
||||
struct dram_addrmap_info *sip_smc_get_dram_map(void);
|
||||
int sip_smc_access_mem_os_reg(u32 func, u32 id, u32 *val);
|
||||
int sip_smc_amp_config(u32 sub_func_id, u32 arg1, u32 arg2, u32 arg3);
|
||||
struct arm_smccc_res sip_smc_get_amp_info(u32 sub_func_id, u32 arg1);
|
||||
struct arm_smccc_res sip_smc_get_pvtpll_info(u32 sub_func_id, u32 arg1);
|
||||
|
|
@ -360,6 +368,13 @@ static inline struct dram_addrmap_info *sip_smc_get_dram_map(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline int sip_smc_access_mem_os_reg(u32 func,
|
||||
u32 id,
|
||||
u32 *val)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int sip_smc_amp_config(u32 sub_func_id,
|
||||
u32 arg1,
|
||||
u32 arg2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue