From 53532b2b680f37c6b691590c0002d3d9eaf0e2e6 Mon Sep 17 00:00:00 2001 From: Sven Ginka Date: Sat, 1 Jun 2024 18:57:52 +0200 Subject: [PATCH] soc: atmel: sam: Add invalidate d-cache at z_arm_platform_init Before that fix, the SOC was unable to boot properly. Starting turned directly into z_arm_usage_fault(). Fixes zephyrproject-rtos#73485 Signed-off-by: Sven Ginka (cherry picked from commit c3d7b1c978f8b462dcbdda998dbaefa981b3d089) --- soc/arm/atmel_sam/same70/soc.c | 1 + soc/arm/atmel_sam/samv71/soc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/soc/arm/atmel_sam/same70/soc.c b/soc/arm/atmel_sam/same70/soc.c index 02ebce73c6de90..cd0125ce35185b 100644 --- a/soc/arm/atmel_sam/same70/soc.c +++ b/soc/arm/atmel_sam/same70/soc.c @@ -122,6 +122,7 @@ void z_arm_platform_init(void) * sys_cache*-functions can enable them, if requested by the * configuration. */ + SCB_InvalidateDCache(); SCB_DisableDCache(); /* diff --git a/soc/arm/atmel_sam/samv71/soc.c b/soc/arm/atmel_sam/samv71/soc.c index 6e82b9fe2f63c6..d6db5fd0509fb1 100644 --- a/soc/arm/atmel_sam/samv71/soc.c +++ b/soc/arm/atmel_sam/samv71/soc.c @@ -119,6 +119,7 @@ void z_arm_platform_init(void) * sys_cache*-functions can enable them, if requested by the * configuration. */ + SCB_InvalidateDCache(); SCB_DisableDCache(); /*