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 D1AC5EB64D8 for ; Thu, 22 Jun 2023 10:01:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8D1C7863D7; Thu, 22 Jun 2023 12:00:42 +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="KxdQ4uVH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 94A4785BC7; Thu, 22 Jun 2023 11:59:39 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (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 A810D847D7 for ; Thu, 22 Jun 2023 11:59:33 +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 [192.166.149.251]) (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 7848F6607072; Thu, 22 Jun 2023 10:59:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687427973; bh=Im8VJAZAyZ7f92qf5S24iR5Impyn181B/mdC45tO8lQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KxdQ4uVH9QyNcV6o3UOIqFs2NBr9V/UMsPYAOKEw2NRzVv6aYgtYef8rsNm8KE+T8 KK3istADHTQitmWxEaoZGG/hXo18aSH4bEQvfNyS2NxPovVeSC2raqYMPLYkt6Q9TT B7fbTk5Pka3j6uNk9zye3urIdqgvyWO6PNCYfOcdzExYKR9e7BpGKb7c0+LQNxZGeY 0Yjp7/RvdKfLMlHIERen/8uJP5zWqm1qTTdhOXZJ5V1MtrVpBA3QJMy0Ug51BoJ6nh Dw+QC2dvSbFtbeF2lesPrvPfNvIcix19+/Vv6vMNB1Q0YAD0Vcrt5N8Jcotwkubyhz oVKvXIKRYY43g== From: Eugen Hristev To: kever.yang@rock-chips.com Cc: marex@denx.de, jonas@kwiboo.se, jagan@edgeble.ai, venkatesh.abbarapu@amd.com, eugen.hristev@collabora.com, u-boot@lists.denx.de Subject: [PATCH 07/10] ARM: mach-rockchip: spl-boot-order: add possibility to DFU Date: Thu, 22 Jun 2023 12:58:46 +0300 Message-Id: <20230622095849.498702-8-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230622095849.498702-1-eugen.hristev@collabora.com> References: <20230622095849.498702-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