Skip to content

Commit

Permalink
soc/xtensa/intel_adsp: Disable L2 cache at boot based on Kconfig
Browse files Browse the repository at this point in the history
Instead of deciding based on SoC version, add information to Kconfig and
get it from there on code.

Signed-off-by: Ederson de Souza <[email protected]>
  • Loading branch information
edersondisouza authored and nashif committed Sep 8, 2022
1 parent fcdc9c7 commit cf6bad7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions soc/xtensa/intel_adsp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,7 @@ config ADSP_INIT_HPSRAM
help
Need to init HP SRAM.

config ADSP_DISABLE_L2CACHE_AT_BOOT
bool

endif # SOC_FAMILY_INTEL_ADSP
2 changes: 2 additions & 0 deletions soc/xtensa/intel_adsp/cavs/Kconfig.defconfig.cavs_v15
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ endif # DAI_INTEL_SSP
config ADSP_INIT_HPSRAM
default n

config ADSP_DISABLE_L2CACHE_AT_BOOT
default y
endif
7 changes: 1 addition & 6 deletions soc/xtensa/intel_adsp/common/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
#define HOST_PAGE_SIZE 4096
#define MANIFEST_SEGMENT_COUNT 3

/* FIXME: Use Kconfig or some other means */
#if defined(CONFIG_SOC_INTEL_CAVS_V15)
#define PLATFORM_DISABLE_L2CACHE_AT_BOOT
#endif

/* FIXME: Use Kconfig or some other means */
#if !defined(CONFIG_SOC_SERIES_INTEL_ACE1X)
#define RESET_MEMORY_HOLE
Expand Down Expand Up @@ -161,7 +156,7 @@ __imr void boot_core0(void)
{
cpu_early_init();

#ifdef PLATFORM_DISABLE_L2CACHE_AT_BOOT
#ifdef CONFIG_ADSP_DISABLE_L2CACHE_AT_BOOT
ADSP_L2PCFG_REG = 0;
#endif

Expand Down

0 comments on commit cf6bad7

Please sign in to comment.