Skip to content

Commit 6f092bc

Browse files
duynguyenxakartben
authored andcommitted
soc: renesas: ra: ra8d1: Disable Dcache as default
Enabling Dcache on RA8D1 will cause many issue with data coherence in driver. This commit disable Dcache for RA8D1 as temporary solution, user can enable it but should be aware of data coherence issue Signed-off-by: Duy Nguyen <[email protected]>
1 parent 543aabf commit 6f092bc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

soc/renesas/ra/ra8d1/Kconfig.defconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ config CLOCK_CONTROL
2121
config FLASH_FILL_BUFFER_SIZE
2222
default 128
2323

24+
config DCACHE
25+
default n
26+
2427
config CACHE_MANAGEMENT
25-
default y
28+
default n
2629

2730
endif # SOC_SERIES_RA8D1

soc/renesas/ra/ra8d1/soc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ void soc_early_init_hook(void)
3939
SystemCoreClock = BSP_MOCO_HZ;
4040
g_protect_pfswe_counter = 0;
4141

42+
#ifdef CONFIG_ICACHE
4243
SCB->CCR = (uint32_t)CCR_CACHE_ENABLE;
4344
barrier_dsync_fence_full();
4445
barrier_isync_fence_full();
45-
46+
#endif
47+
#if defined(CONFIG_DCACHE) && defined(CONFIG_CACHE_MANAGEMENT)
4648
/* Apply Arm Cortex-M85 errata workarounds for D-Cache
4749
* Attributing all cacheable memory as write-through set FORCEWT bit in MSCR register.
4850
* Set bit 16 in ACTLR to 1.
@@ -58,4 +60,5 @@ void soc_early_init_hook(void)
5860
barrier_isync_fence_full();
5961

6062
sys_cache_data_enable();
63+
#endif
6164
}

0 commit comments

Comments
 (0)