diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2019-11-29 16:14:57 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-12-02 11:02:21 +0100 |
commit | 00e86ecdb6ece16d8ec4dae0f50079041d9cd88c (patch) | |
tree | 9d5fe1b98c0835e086bac9250e8f752fc73beba9 | |
parent | a17d92beac8ae7fe5c55318a223ec6afdff03b75 (diff) | |
download | barebox-00e86ecdb6ece16d8ec4dae0f50079041d9cd88c.tar.gz barebox-00e86ecdb6ece16d8ec4dae0f50079041d9cd88c.tar.xz |
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 <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-layerscape/ppa.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <image-fit.h> #include <asm/psci.h> #include <mach/layerscape.h> +#include <asm/cache.h> 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) { |