Skip to contentSkip to conversation

arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI

PATCH New Luca Ceresoli 2 participants 2 messages Apr 15, 2019 – Apr 16, 2019

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

PATCH 1/1 arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI

A missing CONFIG_ prefix while checking for this Kconfig variable makes the check always fail. Fix it. While there also switch from the '#if defined' form to the '#ifdef' form as the other checks in this function.

Fixes 35e2b92344b1 ("arm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCI")
---
 arch/arm/mach-zynqmp/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-zynqmp/spl.c +1 -1
index f6f5414201b5..b7d2ecdf7257 100644
@@ -85,7 +85,7 @@ u32 spl_boot_device(void)
 	case SD_MODE1:
 	case SD1_LSHFT_MODE: /* not working on silicon v1 */
 /* if both controllers enabled, then these two are the second controller */
-#if defined(SPL_ZYNQMP_TWO_SDHCI)
+#ifdef CONFIG_SPL_ZYNQMP_TWO_SDHCI
 		return BOOT_DEVICE_MMC2;
 /* else, fall through, the one SDHCI controller that is enabled is number 1 */
 #endif
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI

Quoted 17 lines · Luca Ceresoli

A missing CONFIG_ prefix while checking for this Kconfig variable makes the check always fail. Fix it. While there also switch from the '#if defined' form to the '#ifdef' form as the other checks in this function.

Fixes 35e2b92344b1 ("arm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCI")
---
 arch/arm/mach-zynqmp/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-zynqmp/spl.c +0 -0
index f6f5414201b5..b7d2ecdf7257 100644

arch/arm/mach-zynqmp/spl.c u32 spl_boot_device(void) · line 91

Quoted 8 lines
arch/arm/mach-zynqmp/spl.c +1 -1
@@ -85,7 +85,7 @@ u32 spl_boot_device(void)
 	case SD_MODE1:
 	case SD1_LSHFT_MODE: /* not working on silicon v1 */
 /* if both controllers enabled, then these two are the second controller */
-#if defined(SPL_ZYNQMP_TWO_SDHCI)
+#ifdef CONFIG_SPL_ZYNQMP_TWO_SDHCI
 		return BOOT_DEVICE_MMC2;
 /* else, fall through, the one SDHCI controller that is enabled is number 1 */
 #endif

Nice catch. Applied.

Thanks,
Michal