Skip to contentSkip to conversation

armv8: mach-k3: correct define checking for AM625/AM642 memory maps

PATCH In review Matt Ranostay 2 participants 3 messages Jul 13, 2022 – Jul 25, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv8: mach-k3: correct define checking for AM625/AM642 memory maps

Using CONFIG_IS_ENABLED breaks accessing memory map structure when doing a A53 SPL build for AM625 and AM642 platforms. This is due to 'abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y'' in which there is no CONFIG_SPL_SOC_K3_AM625/CONFIG_SPL_SOC_K3_AM642 defined in the configuration.

For the A53 SPL builds on these platform to access the memory mapping which it will need for enabling the mmu/cache it must use #if defined(X) checks and not CONFIG_IS_ENABLED.

Cc Suman Anna <[email protected]>
Cc Neha Francis <[email protected]>
---
 arch/arm/mach-k3/arm64-mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-k3/arm64-mmu.c +1 -1
index 12cb89335ad..c43c07ce7fa 100644
@@ -222,7 +222,7 @@ struct mm_region *mem_map = j721s2_mem_map;
 
 #endif /* CONFIG_SOC_K3_J721S2 */
 
-#if (CONFIG_IS_ENABLED(SOC_K3_AM642) || CONFIG_IS_ENABLED(SOC_K3_AM625))
+#if defined(CONFIG_SOC_K3_AM642) || defined(CONFIG_SOC_K3_AM625)
 /* NR_DRAM_BANKS + 32bit IO + 64bit IO + terminator */
 #define NR_MMU_REGIONS	(CONFIG_NR_DRAM_BANKS + 3)
 
Signature · 1 line
2.36.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Matt Ranostay

Using CONFIG_IS_ENABLED breaks accessing memory map structure when doing a A53 SPL build for AM625 and AM642 platforms. This is due to 'abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y'' in which there is no CONFIG_SPL_SOC_K3_AM625/CONFIG_SPL_SOC_K3_AM642 defined in the configuration.

Quoted 7 lines

For the A53 SPL builds on these platform to access the memory mapping which it will need for enabling the mmu/cache it must use #if defined(X) checks and not CONFIG_IS_ENABLED.

Cc Suman Anna <[email protected]>
Cc Neha Francis <[email protected]>
Signature · 1 line
Tom
#2 lore raw
In reply to Matt Ranostay
Quoted 6 lines · Matt Ranostay

Using CONFIG_IS_ENABLED breaks accessing memory map structure when doing a A53 SPL build for AM625 and AM642 platforms. This is due to 'abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y'' in which there is no CONFIG_SPL_SOC_K3_AM625/CONFIG_SPL_SOC_K3_AM642 defined in the configuration.

Quoted 8 lines

For the A53 SPL builds on these platform to access the memory mapping which it will need for enabling the mmu/cache it must use #if defined(X) checks and not CONFIG_IS_ENABLED.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom