Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2192C021A1 for ; Tue, 11 Feb 2025 05:34:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AC509807C0; Tue, 11 Feb 2025 06:34:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=radxa.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3F5B380B9C; Tue, 11 Feb 2025 06:34:36 +0100 (CET) Received: from mail.naobsd.org (sakura.naobsd.org [160.16.200.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D07928043C for ; Tue, 11 Feb 2025 06:34:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=radxa.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=naoki@radxa.com Received: from secure.fukaumi.org ([10.0.0.2]) by mail.naobsd.org (8.14.4/8.14.4/Debian-4.1ubuntu1.1) with ESMTP id 51B5Xk4h024751; Tue, 11 Feb 2025 14:33:52 +0900 From: FUKAUMI Naoki To: u-boot@lists.denx.de Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, trini@konsulko.com, jonas@kwiboo.se, quentin.schulz@cherry.de, jagan@amarulasolutions.com, dsimic@manjaro.org, pbrobinson@gmail.com, liujianfeng1994@gmail.com, paulk@sys-base.io, ricardo@pardini.net, heiko@sntech.de, macromorgan@hotmail.com, michal.simek@amd.com, seb-dev@mail.de, christopher.obbard@linaro.org, ilias.apalodimas@linaro.org, marex@denx.de, mkorpershoek@baylibre.com, xypron.glpk@gmx.de, jerome.forissier@linaro.org, FUKAUMI Naoki Subject: [PATCH 2/7] rockchip: Add DFU to SPL Date: Tue, 11 Feb 2025 05:33:35 +0000 Message-ID: <20250211053340.92919-3-naoki@radxa.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250211053340.92919-1-naoki@radxa.com> References: <20250211053340.92919-1-naoki@radxa.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Allows SPL to use DFU when SPL is booted from USB. Signed-off-by: FUKAUMI Naoki --- 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; + /* * This should eventually move into the SPL code, once SPL becomes * aware of the block-device layer. Until then (and to avoid unneeded -- 2.43.0