soc: arm: remove redundant cache config options for kv5x
Remove the redundant cache config options for kv5x and use the sys_cache* functions to enable the caches. This will automatically consider CONFIG_CACHE_MANAGEMENT. Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
This commit is contained in:
parent
d992683db5
commit
1f1b430d88
2 changed files with 3 additions and 16 deletions
|
@ -57,12 +57,4 @@ config SOC_PART_NUMBER_KINETIS_KV5X
|
||||||
number selection choice defines the default value for this
|
number selection choice defines the default value for this
|
||||||
string.
|
string.
|
||||||
|
|
||||||
config KINETIS_KV5X_ENABLE_CODE_CACHE
|
|
||||||
bool "Code cache"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config KINETIS_KV5X_ENABLE_DATA_CACHE
|
|
||||||
bool "Data cache"
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # SOC_SERIES_KINETIS_KV5X
|
endif # SOC_SERIES_KINETIS_KV5X
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
#include <zephyr/init.h>
|
#include <zephyr/init.h>
|
||||||
|
#include <zephyr/cache.h>
|
||||||
#include <fsl_common.h>
|
#include <fsl_common.h>
|
||||||
#include <fsl_clock.h>
|
#include <fsl_clock.h>
|
||||||
|
|
||||||
|
@ -90,14 +91,8 @@ static int kv5x_init(void)
|
||||||
/* Initialize system clocks and PLL */
|
/* Initialize system clocks and PLL */
|
||||||
clk_init();
|
clk_init();
|
||||||
|
|
||||||
#ifndef CONFIG_KINETIS_KV5X_ENABLE_CODE_CACHE
|
sys_cache_instr_enable();
|
||||||
/* SystemInit will have enabled the code cache. Disable it here */
|
sys_cache_data_enable();
|
||||||
SCB_DisableICache();
|
|
||||||
#endif
|
|
||||||
#ifndef CONFIG_KINETIS_KV5X_ENABLE_DATA_CACHE
|
|
||||||
/* SystemInit will have enabled the data cache. Disable it here */
|
|
||||||
SCB_DisableDCache();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue