From 4e880e62dc37f76da4c8428ea6c519a139f3b0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Mon, 15 Apr 2024 11:56:10 +0200 Subject: [PATCH] drivers: cache: nrf: Use CONFIG_DCACHE_LINE_SIZE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use Kconfig instead of fixed value in the driver code. Signed-off-by: Krzysztof Chruściński --- drivers/cache/cache_nrf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cache/cache_nrf.c b/drivers/cache/cache_nrf.c index d1a2812772..3cf7989787 100644 --- a/drivers/cache/cache_nrf.c +++ b/drivers/cache/cache_nrf.c @@ -14,7 +14,6 @@ LOG_MODULE_REGISTER(cache_nrfx, CONFIG_CACHE_LOG_LEVEL); #define NRF_ICACHE NRF_CACHE #endif -#define CACHE_LINE_SIZE 32 #define CACHE_BUSY_RETRY_INTERVAL_US 10 @@ -145,11 +144,11 @@ static inline int _cache_range(NRF_CACHE_Type *cache, enum k_nrf_cache_op op, vo /* * Align address to line size */ - line_addr &= ~(CACHE_LINE_SIZE - 1); + line_addr &= ~(CONFIG_DCACHE_LINE_SIZE - 1); do { _cache_line(cache, op, line_addr); - line_addr += CACHE_LINE_SIZE; + line_addr += CONFIG_DCACHE_LINE_SIZE; } while (line_addr < end_addr); wait_for_cache(cache);