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>
This commit is contained in:
Siva Durga Prasad Paladugu
2017-07-13 19:01:09 +05:30
committed by Michal Simek
parent 189bec47ab
commit a076789efe
2 changed files with 22 additions and 0 deletions

View File

@@ -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) {