Skip to contentSkip to conversation

board: freescale: p1_p2_rdb_pc: Allow to compile without __SW_BOOT_SD macro

PATCH New Pali Rohár 1 participant 2 messages Apr 28, 2022 – Jun 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: freescale: p1_p2_rdb_pc: Allow to compile without __SW_BOOT_SD macro

Add #ifdef guard for __SW_BOOT_SD macro like there are guards for all other __SW_BOOT_* macros.

---
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +4 -1
index e559a77b2dac..a8318ff40b6a 100644
@@ -209,8 +209,11 @@ int checkboard(void)
 	val = ((in ^ invert) & io_config) | (out & (~io_config));
 
 	puts("rom_loc: ");
-	if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD) {
+	if (0) {
+#ifdef __SW_BOOT_SD
+	} else if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD) {
 		puts("sd");
+#endif
 #ifdef __SW_BOOT_SD2
 	} else if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD2) {
 		puts("sd");
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 board: freescale: p1_p2_rdb_pc: Allow to compile without __SW_BOOT_SD macro

Add #ifdef guard for __SW_BOOT_SD macro like there are guards for all other __SW_BOOT_* macros.

---
Changes in v2:
* Rebase on top of next branch, commit 9121478ee6f2aee381f8fe49d8997d43527d351a

---
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +4 -1
index 947bbc9a5ab7..ffa9aebad1c0 100644
@@ -224,8 +224,11 @@ int checkboard(void)
 	val = (in & io_config) | (out & (~io_config));
 
 	puts("rom_loc: ");
-	if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD) {
+	if (0) {
+#ifdef __SW_BOOT_SD
+	} else if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD) {
 		puts("sd");
+#endif
 #ifdef __SW_BOOT_SD2
 	} else if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD2) {
 		puts("sd");
Signature · 1 line
2.20.1