[PATCH 31/39] ARM: layerscape: ppa: use sync_for_execution instead of a manual cache flush

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 arch/arm/mach-layerscape/ppa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
index 607045102071..987cb6587608 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) {
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux