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

2023-08-11 Thread Kever Yang



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 

Reviewed-by: Kever Yang 

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,
)) {
return BOOT_DEVICE_SPI;
+   } else if (!uclass_get_device_by_of_offset(UCLASS_USB_GADGET_GENERIC,
+   node, )) {
+   return BOOT_DEVICE_DFU;
}
  
  	/*


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

2023-08-01 Thread Eugen Hristev
Add DFU as a possible SPL boot media if the boot device is a
gadget device.

Signed-off-by: Eugen Hristev 
---
 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,
)) {
return BOOT_DEVICE_SPI;
+   } else if (!uclass_get_device_by_of_offset(UCLASS_USB_GADGET_GENERIC,
+   node, )) {
+   return BOOT_DEVICE_DFU;
}
 
/*
-- 
2.34.1