Add function "psci_set_memory_secure" for device to set memory
region secured.
Change-Id: Ife807c91d37ae66a5e1a0a3d8263c68cd601937d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
return reg_rd_fn(PSCI_SIP_RKTF_VER, 0, 0, 0, NULL);
}
+u32 psci_set_memory_secure(bool val)
+{
+ return reg_wr_fn(PSCI_SIP_SMEM_CONFIG, val, 0, 0);
+}
+
/*************************** fiq debug *****************************/
#ifdef CONFIG_ARM64
static u64 ft_fiq_mem_phy;
void psci_fiq_debugger_uart_irq_tf_init(u32 irq_id, void *callback);
void psci_fiq_debugger_enable_debug(bool val);
+#if defined(CONFIG_ARM_PSCI) || defined(CONFIG_ARM64)
+u32 psci_set_memory_secure(bool val);
+#else
+static inline u32 psci_set_memory_secure(bool val)
+{
+ return 0;
+}
+#endif
+
#endif /* __ROCKCHIP_PSCI_H */