Hi,

On 2025-02-11 06:33, FUKAUMI Naoki wrote:
> Allows SPL to use DFU when SPL is booted from USB.
> 
> Signed-off-by: FUKAUMI Naoki <na...@radxa.com>
> ---
>  arch/arm/mach-rockchip/spl-boot-order.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/mach-rockchip/spl-boot-order.c 
> b/arch/arm/mach-rockchip/spl-boot-order.c
> index 3dce9b30898..2943c8bb494 100644
> --- a/arch/arm/mach-rockchip/spl-boot-order.c
> +++ b/arch/arm/mach-rockchip/spl-boot-order.c
> @@ -35,6 +35,10 @@ static int spl_node_to_boot_device(int node)
>  {
>       struct udevice *parent;
>  
> +     if (!uclass_get_device_by_of_offset(UCLASS_USB_GADGET_GENERIC,
> +                                         node, &parent))
> +             return BOOT_DEVICE_DFU;

Please move this to the end of the function after the UCLASS_SPI_FLASH /
BOOT_DEVICE_SPI part. DFU boot is likely to be the least of mmc,
spi-flash and dfu being looked up.

This should probably also check for CONFIG_IS_ENABLED(DFU).

Regards,
Jonas

> +
>       /*
>        * This should eventually move into the SPL code, once SPL becomes
>        * aware of the block-device layer.  Until then (and to avoid unneeded

Reply via email to