From 00e86ecdb6ece16d8ec4dae0f50079041d9cd88c Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 29 Nov 2019 16:14:57 +0100 Subject: ARM: layerscape: ppa: use sync_for_execution instead of a manual cache flush The copied code is then jumped to, so we need to sync the caches for execution instead of just flushing the data caches. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- arch/arm/mach-layerscape/ppa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-layerscape/ppa.c') diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c index 6070451020..987cb65876 100644 --- a/arch/arm/mach-layerscape/ppa.c +++ b/arch/arm/mach-layerscape/ppa.c @@ -14,9 +14,9 @@ #include #include #include +#include int ppa_entry(const void *, u32 *, u32 *); -void dma_flush_range(void *ptr, size_t size); static int of_psci_do_fixup(struct device_node *root, void *unused) { @@ -73,7 +73,7 @@ static int ppa_init(void *ppa, size_t ppa_size, void *sec_firmware_addr) /* Copy the secure firmware to secure memory */ memcpy(sec_firmware_addr, buf, firmware_size); - dma_flush_range(sec_firmware_addr, ppa_size); + sync_caches_for_execution(); ret = ppa_entry(sec_firmware_addr, boot_loc_ptr_l, boot_loc_ptr_h); if (ret) { -- cgit v1.2.3