[PATCH v2 07/10] ARM: mach-rockchip: spl-boot-order: add possibility to DFU

Eugen Hristev eugen.hristev at collabora.com
Tue Aug 1 09:28:08 CEST 2023


Add DFU as a possible SPL boot media if the boot device is a
gadget device.

Signed-off-by: Eugen Hristev <eugen.hristev at collabora.com>
---
 arch/arm/mach-rockchip/spl-boot-order.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index 93b8e7de4d0d..89bbe449e86c 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -66,6 +66,9 @@ static int spl_node_to_boot_device(int node)
 	} else if (!uclass_get_device_by_of_offset(UCLASS_SPI_FLASH, node,
 		&parent)) {
 		return BOOT_DEVICE_SPI;
+	} else if (!uclass_get_device_by_of_offset(UCLASS_USB_GADGET_GENERIC,
+		node, &parent)) {
+		return BOOT_DEVICE_DFU;
 	}
 
 	/*
-- 
2.34.1



More information about the U-Boot mailing list