From mboxrd@z Thu Jan 1 00:00:00 1970 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 DDE06C0015E for ; Tue, 1 Aug 2023 07:29:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8221086C73; Tue, 1 Aug 2023 09:28:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="ja3BcY9q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 55FFF86BFC; Tue, 1 Aug 2023 09:28:44 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0D47286BE2 for ; Tue, 1 Aug 2023 09:28:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eugen.hristev@collabora.com Received: from eugen-station.. (unknown [82.76.24.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ehristev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 18A016607188; Tue, 1 Aug 2023 08:28:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1690874917; bh=Im8VJAZAyZ7f92qf5S24iR5Impyn181B/mdC45tO8lQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ja3BcY9qbznV06rUo3qNxJBrwhtelfviIS1EjhJDxSQcjc+lZ1DPMZX99kCNb1qjy C3Xb3nKTQoZgIA3R32ikkJ+o89OGRTY+piMtlLIHJJOCYsC9aBzMNSuVu28vvR6WEl N3fZzqDk6RaG4Vwkri9v/vb2da/d+Qq19xhdJTY9B2GN7IvHWE7CRSwNyG2xGBp7Vu aqSiXBHtnw1yY1BRAcI0Qcd80bOR17te2EW6uFhdu8MCq8KrFyoYVPIezdvO5s80j7 Y6uW7faIp61LYU2YFfR6ksXSLxET/77VK48jYorhQwekcWm/JbZ76jaJaU+jGpPqXu d4Jh2HG+aPWCQ== From: Eugen Hristev To: kever.yang@rock-chips.com, u-boot@lists.denx.de Cc: marex@denx.de, jonas@kwiboo.se, jagan@edgeble.ai, eugen.hristev@collabora.com, kernel@collabora.com Subject: [PATCH v2 07/10] ARM: mach-rockchip: spl-boot-order: add possibility to DFU Date: Tue, 1 Aug 2023 10:28:08 +0300 Message-Id: <20230801072811.10354-8-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230801072811.10354-1-eugen.hristev@collabora.com> References: <20230801072811.10354-1-eugen.hristev@collabora.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 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, &parent)) { return BOOT_DEVICE_SPI; + } else if (!uclass_get_device_by_of_offset(UCLASS_USB_GADGET_GENERIC, + node, &parent)) { + return BOOT_DEVICE_DFU; } /* -- 2.34.1