diff options
author | Michal Simek <michal.simek@xilinx.com> | 2019-10-04 15:45:29 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-10-24 13:37:01 +0200 |
commit | 866225f394a9b3174d9ea39d2d19ac0d2c07a516 (patch) | |
tree | 888ed3852c5fb966b3468dbbfb7687d7cab76721 /arch/arm/mach-versal | |
parent | 0f3604a2b3882bc0f6c66cfd5acbd074703a5814 (diff) |
arm64: xilinx: Move firmware functions from platform to driver
versal_pm_request() and invoke_smc() are almost the same. Only one
difference is that versal_pm_request is adding PM_SIP_SVC offset to api_id.
The patch is moving platform implementation to firmware driver code for
synchronization.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Diffstat (limited to 'arch/arm/mach-versal')
-rw-r--r-- | arch/arm/mach-versal/cpu.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-versal/include/mach/sys_proto.h | 3 |
2 files changed, 0 insertions, 29 deletions
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c index 60394e761e..6ee6cd43ec 100644 --- a/arch/arm/mach-versal/cpu.c +++ b/arch/arm/mach-versal/cpu.c @@ -9,7 +9,6 @@ #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/sys_proto.h> -#include <zynqmp_firmware.h> DECLARE_GLOBAL_DATA_PTR; @@ -108,28 +107,3 @@ int reserve_mmu(void) return 0; } #endif - -int versal_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2, - u32 arg3, u32 *ret_payload) -{ - struct pt_regs regs; - - if (current_el() == 3) - return 0; - - regs.regs[0] = PM_SIP_SVC | api_id; - regs.regs[1] = ((u64)arg1 << 32) | arg0; - regs.regs[2] = ((u64)arg3 << 32) | arg2; - - smc_call(®s); - - if (ret_payload) { - ret_payload[0] = (u32)regs.regs[0]; - ret_payload[1] = upper_32_bits(regs.regs[0]); - ret_payload[2] = (u32)regs.regs[1]; - ret_payload[3] = upper_32_bits(regs.regs[1]); - ret_payload[4] = (u32)regs.regs[2]; - } - - return regs.regs[0]; -} diff --git a/arch/arm/mach-versal/include/mach/sys_proto.h b/arch/arm/mach-versal/include/mach/sys_proto.h index c282078f86..31af049a21 100644 --- a/arch/arm/mach-versal/include/mach/sys_proto.h +++ b/arch/arm/mach-versal/include/mach/sys_proto.h @@ -12,6 +12,3 @@ enum { void tcm_init(u8 mode); void mem_map_fill(void); - -int versal_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2, - u32 arg3, u32 *ret_payload); |