On 2023/8/1 15:28, Eugen Hristev wrote:
Add DFU as a possible SPL boot media if the boot device is a
gadget device.
Signed-off-by: Eugen Hristev <eugen.hris...@collabora.com>
Reviewed-by: Kever Yang <kever.y...@rock-chips.com>
Thanks,
- Kever
---
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;
}
/*