diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2017-07-13 19:01:09 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2017-08-02 09:11:52 +0200 |
commit | a076789efe60ba9a9e22e47c278e03040812cde7 (patch) | |
tree | aa9496cddedd0998aa11523e0f50846969ff32d2 /arch/arm/cpu | |
parent | 189bec47ab1ff1b4bec6060f199f11dab9cd7b2d (diff) |
arm64: zynqmp: Define a way to intialize TCM
TCM on ZynqMP needs to be intialized in a sequence
and this patch provides a global routine to perform
this as per requirement.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv8/zynqmp/mp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/zynqmp/mp.c b/arch/arm/cpu/armv8/zynqmp/mp.c index e10fc3136c..76f889ba7d 100644 --- a/arch/arm/cpu/armv8/zynqmp/mp.c +++ b/arch/arm/cpu/armv8/zynqmp/mp.c @@ -206,6 +206,21 @@ static void write_tcm_boot_trampoline(u32 boot_addr) } } +void initialize_tcm(bool mode) +{ + if (!mode) { + set_r5_tcm_mode(LOCK); + set_r5_halt_mode(HALT, LOCK); + enable_clock_r5(); + release_r5_reset(LOCK); + } else { + set_r5_tcm_mode(SPLIT); + set_r5_halt_mode(HALT, SPLIT); + enable_clock_r5(); + release_r5_reset(SPLIT); + } +} + int cpu_release(int nr, int argc, char * const argv[]) { if (nr >= ZYNQMP_CORE_APU0 && nr <= ZYNQMP_CORE_APU3) { |