diff mbox series

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

Message ID 20230622095849.498702-8-eugen.hristev@collabora.com
State Superseded
Delegated to: Kever Yang
Headers show
Series rockchip: rk3588: add support for DFU in SPL | expand

Commit Message

Eugen Hristev June 22, 2023, 9:58 a.m. UTC
Add DFU as a possible SPL boot media if the boot device is a
gadget device.

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

Patch

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;
 	}
 
 	/*