Skip to contentSkip to conversation

arm: mvebu: a3720: Set BOOT_TARGET_DEVICES list to enabled peripherals

PATCH In review Pali Rohár 2 participants 6 messages May 23, 2022 – Jul 21, 2022

lore
Share & tools
lore
#1 lore raw

PATCH 2/2 arm: mvebu: a3720: Add NVMe to BOOT_TARGET_DEVICES list

In reply to Pali Rohár

Enable NVMe booting on boards which have enabled NVMe drivers.

---
 include/configs/mvebu_armada-37xx.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/configs/mvebu_armada-37xx.h +7 -0
index 2ed6125f5c43..d656bbc463b2 100644
@@ -58,6 +58,12 @@
 #define BOOT_TARGET_DEVICES_SCSI(func)
 #endif
 
+#ifdef CONFIG_NVME
+#define BOOT_TARGET_DEVICES_NVME(func) func(NVME, nvme, 0)
+#else
+#define BOOT_TARGET_DEVICES_NVME(func)
+#endif
+
 #if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
 #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
 #else
@@ -74,6 +80,7 @@
 	BOOT_TARGET_DEVICES_MMC(func, 1) \
 	BOOT_TARGET_DEVICES_MMC(func, 0) \
 	BOOT_TARGET_DEVICES_USB(func) \
+	BOOT_TARGET_DEVICES_NVME(func) \
 	BOOT_TARGET_DEVICES_SCSI(func) \
 	BOOT_TARGET_DEVICES_PXE(func) \
 	BOOT_TARGET_DEVICES_DHCP(func)
Signature · 1 line
2.20.1
#0 lore raw

PATCH 1/2 arm: mvebu: a3720: Set BOOT_TARGET_DEVICES list to enabled peripherals

This allows to compile U-Boot without some boot option for some A3720 board which does not have that peripheral.

---
 include/configs/mvebu_armada-37xx.h | 42 ++++++++++++++++++++++++-----
 1 file changed, 36 insertions(+), 6 deletions(-)
include/configs/mvebu_armada-37xx.h +36 -6
index a39db075eae9..2ed6125f5c43 100644
@@ -40,13 +40,43 @@
 #define CONFIG_LBA48
 #define CONFIG_SYS_64BIT_LBA
 
+#ifdef CONFIG_MMC
+#define BOOT_TARGET_DEVICES_MMC(func, i) func(MMC, mmc, i)
+#else
+#define BOOT_TARGET_DEVICES_MMC(func, i)
+#endif
+
+#ifdef CONFIG_USB_STORAGE
+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_DEVICES_USB(func)
+#endif
+
+#ifdef CONFIG_SCSI
+#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
+#else
+#define BOOT_TARGET_DEVICES_SCSI(func)
+#endif
+
+#if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
+#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
+#else
+#define BOOT_TARGET_DEVICES_PXE(func)
+#endif
+
+#ifdef CONFIG_CMD_DHCP
+#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
+#else
+#define BOOT_TARGET_DEVICES_DHCP(func)
+#endif
+
 #define BOOT_TARGET_DEVICES(func) \
-	func(MMC, mmc, 1) \
-	func(MMC, mmc, 0) \
-	func(USB, usb, 0) \
-	func(SCSI, scsi, 0) \
-	func(PXE, pxe, na) \
-	func(DHCP, dhcp, na)
+	BOOT_TARGET_DEVICES_MMC(func, 1) \
+	BOOT_TARGET_DEVICES_MMC(func, 0) \
+	BOOT_TARGET_DEVICES_USB(func) \
+	BOOT_TARGET_DEVICES_SCSI(func) \
+	BOOT_TARGET_DEVICES_PXE(func) \
+	BOOT_TARGET_DEVICES_DHCP(func)
 
 #include <config_distro_bootcmd.h>
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/2
#4 lore raw
Quoted 4 lines · Pali Rohár

This allows to compile U-Boot without some boot option for some A3720 board which does not have that peripheral.

Thanks,
Stefan

Quoted 48 lines
---
  include/configs/mvebu_armada-37xx.h | 42 ++++++++++++++++++++++++-----
  1 file changed, 36 insertions(+), 6 deletions(-)
include/configs/mvebu_armada-37xx.h +30 -5
index a39db075eae9..2ed6125f5c43 100644
@@ -40,13 +40,43 @@
  #define CONFIG_LBA48
  #define CONFIG_SYS_64BIT_LBA
 
+#ifdef CONFIG_MMC
+#define BOOT_TARGET_DEVICES_MMC(func, i) func(MMC, mmc, i)
+#else
+#define BOOT_TARGET_DEVICES_MMC(func, i)
+#endif
+
+#ifdef CONFIG_USB_STORAGE
+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_DEVICES_USB(func)
+#endif
+
+#ifdef CONFIG_SCSI
+#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
+#else
+#define BOOT_TARGET_DEVICES_SCSI(func)
+#endif
+
+#if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
+#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
+#else
+#define BOOT_TARGET_DEVICES_PXE(func)
+#endif
+
+#ifdef CONFIG_CMD_DHCP
+#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
+#else
+#define BOOT_TARGET_DEVICES_DHCP(func)
+#endif
+
  #define BOOT_TARGET_DEVICES(func) \
-	func(MMC, mmc, 1) \
-	func(MMC, mmc, 0) \
-	func(USB, usb, 0) \
-	func(SCSI, scsi, 0) \
-	func(PXE, pxe, na) \

include/configs/mvebu_armada-37xx.h line 82

Quoted 10 lines
include/configs/mvebu_armada-37xx.h +6 -1
-	func(DHCP, dhcp, na)
+	BOOT_TARGET_DEVICES_MMC(func, 1) \
+	BOOT_TARGET_DEVICES_MMC(func, 0) \
+	BOOT_TARGET_DEVICES_USB(func) \
+	BOOT_TARGET_DEVICES_SCSI(func) \
+	BOOT_TARGET_DEVICES_PXE(func) \
+	BOOT_TARGET_DEVICES_DHCP(func)
 
  #include <config_distro_bootcmd.h>
 

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] arm: mvebu: a3720: Add NVMe to BOOT_TARGET_DEVICES list

In reply to Pali Rohár
Quoted 3 lines · Pali Rohár

Enable NVMe booting on boards which have enabled NVMe drivers.

Thanks,
Stefan

Quoted 22 lines
---
  include/configs/mvebu_armada-37xx.h | 7 +++++++
  1 file changed, 7 insertions(+)
include/configs/mvebu_armada-37xx.h +6 -0
index 2ed6125f5c43..d656bbc463b2 100644
@@ -58,6 +58,12 @@
  #define BOOT_TARGET_DEVICES_SCSI(func)
  #endif
 
+#ifdef CONFIG_NVME
+#define BOOT_TARGET_DEVICES_NVME(func) func(NVME, nvme, 0)
+#else
+#define BOOT_TARGET_DEVICES_NVME(func)
+#endif
+
  #if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
  #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
  #else

include/configs/mvebu_armada-37xx.h line 86

Quoted 7 lines
include/configs/mvebu_armada-37xx.h +1 -0
@@ -74,6 +80,7 @@
  	BOOT_TARGET_DEVICES_MMC(func, 1) \
  	BOOT_TARGET_DEVICES_MMC(func, 0) \
  	BOOT_TARGET_DEVICES_USB(func) \
+	BOOT_TARGET_DEVICES_NVME(func) \
  	BOOT_TARGET_DEVICES_SCSI(func) \
  	BOOT_TARGET_DEVICES_PXE(func) \
  	BOOT_TARGET_DEVICES_DHCP(func)

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#5 lore raw
In reply to Pali Rohár
Quoted 4 lines · Pali Rohár

This allows to compile U-Boot without some boot option for some A3720 board which does not have that peripheral.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 48 lines
---
  include/configs/mvebu_armada-37xx.h | 42 ++++++++++++++++++++++++-----
  1 file changed, 36 insertions(+), 6 deletions(-)
include/configs/mvebu_armada-37xx.h +30 -5
index a39db075eae9..2ed6125f5c43 100644
@@ -40,13 +40,43 @@
  #define CONFIG_LBA48
  #define CONFIG_SYS_64BIT_LBA
 
+#ifdef CONFIG_MMC
+#define BOOT_TARGET_DEVICES_MMC(func, i) func(MMC, mmc, i)
+#else
+#define BOOT_TARGET_DEVICES_MMC(func, i)
+#endif
+
+#ifdef CONFIG_USB_STORAGE
+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_DEVICES_USB(func)
+#endif
+
+#ifdef CONFIG_SCSI
+#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
+#else
+#define BOOT_TARGET_DEVICES_SCSI(func)
+#endif
+
+#if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
+#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
+#else
+#define BOOT_TARGET_DEVICES_PXE(func)
+#endif
+
+#ifdef CONFIG_CMD_DHCP
+#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
+#else
+#define BOOT_TARGET_DEVICES_DHCP(func)
+#endif
+
  #define BOOT_TARGET_DEVICES(func) \
-	func(MMC, mmc, 1) \
-	func(MMC, mmc, 0) \
-	func(USB, usb, 0) \
-	func(SCSI, scsi, 0) \
-	func(PXE, pxe, na) \

include/configs/mvebu_armada-37xx.h line 82

Quoted 10 lines
include/configs/mvebu_armada-37xx.h +6 -1
-	func(DHCP, dhcp, na)
+	BOOT_TARGET_DEVICES_MMC(func, 1) \
+	BOOT_TARGET_DEVICES_MMC(func, 0) \
+	BOOT_TARGET_DEVICES_USB(func) \
+	BOOT_TARGET_DEVICES_SCSI(func) \
+	BOOT_TARGET_DEVICES_PXE(func) \
+	BOOT_TARGET_DEVICES_DHCP(func)
 
  #include <config_distro_bootcmd.h>
 

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#3 lore raw

Re: [PATCH 2/2] arm: mvebu: a3720: Add NVMe to BOOT_TARGET_DEVICES list

In reply to Pali Rohár
Quoted 3 lines · Pali Rohár

Enable NVMe booting on boards which have enabled NVMe drivers.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 22 lines
---
  include/configs/mvebu_armada-37xx.h | 7 +++++++
  1 file changed, 7 insertions(+)
include/configs/mvebu_armada-37xx.h +6 -0
index 2ed6125f5c43..d656bbc463b2 100644
@@ -58,6 +58,12 @@
  #define BOOT_TARGET_DEVICES_SCSI(func)
  #endif
 
+#ifdef CONFIG_NVME
+#define BOOT_TARGET_DEVICES_NVME(func) func(NVME, nvme, 0)
+#else
+#define BOOT_TARGET_DEVICES_NVME(func)
+#endif
+
  #if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
  #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
  #else

include/configs/mvebu_armada-37xx.h line 86

Quoted 7 lines
include/configs/mvebu_armada-37xx.h +1 -0
@@ -74,6 +80,7 @@
  	BOOT_TARGET_DEVICES_MMC(func, 1) \
  	BOOT_TARGET_DEVICES_MMC(func, 0) \
  	BOOT_TARGET_DEVICES_USB(func) \
+	BOOT_TARGET_DEVICES_NVME(func) \
  	BOOT_TARGET_DEVICES_SCSI(func) \
  	BOOT_TARGET_DEVICES_PXE(func) \
  	BOOT_TARGET_DEVICES_DHCP(func)

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]