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 C1CD9C43334 for ; Sat, 9 Jul 2022 18:50:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35BAC84608; Sat, 9 Jul 2022 20:50:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="YW0DPrnn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C66984607; Sat, 9 Jul 2022 20:50:13 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA54584607 for ; Sat, 9 Jul 2022 20:50:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jbx6244@gmail.com Received: by mail-ej1-x62d.google.com with SMTP id l23so2684679ejr.5 for ; Sat, 09 Jul 2022 11:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=+m2ylfqQfAfyuYEDkM6CBTXs2T53LBuVd+7SqJqm2gk=; b=YW0DPrnnTN2pgyFATMdhqdLSTJRPeouDUtnrY2KksLw1CghAidcShDnEHul40Co0io +Pa9OVsj7zZibmp3SKuUnRNe8FcgHlEmJ/5C/OYQHblhgehz34jb37+JySHO6aH277D+ jSedhh0K0fOGym0tmgrP+I9n5wT0ZQgCADEofpDHtl+juG4dFyLNOZu+8hYGVSddvBqu 94KZxMwrTqxNqHRNSErK1x+braKeiewJaRa+bDkxxN06QJJBk2q/11YJl/o55kcmNbsJ ZGUMxvc6AqzPG2FwgedjAStFgi/ZQvsxoSTt9ZAhRvmVcKXfph6t9I7Q09AAzpbCF8bL oCnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=+m2ylfqQfAfyuYEDkM6CBTXs2T53LBuVd+7SqJqm2gk=; b=CtdT5neap/0AklSSy7u8Jsx5GKHdQQaeqca7oZH8H53rPGKmclyyCXvmd3a38Rq+63 NEFR9YlWXlnUMVWBiRKm/m3sew0Unftt9RyNp9FoJ+3ogEJHgZiL4taXTGW27RVIofV1 HIzaENcod/duYrW3J6ZWs5CuGB5/j3X490KaXooTfBpe0uZnsi55ZfZIEbGv0mu/IPn1 tQyM8RANRzx0urZaaIo7JmTPKFzhBdD406WblrXm30iuLphi5zo9vJzLKZ4AxSin91aL ATrMDlQQXbV6LcR4c53Rci6EDI2MLwua8ad2Ia62RyaVdsYqaGHPxCw/kkFiiRbUt+Aj S2WQ== X-Gm-Message-State: AJIora+YGwTjEzHsUB+f4/9CF265JrOFxdt0iMqyqzKgtP3GdTf1IZPV 17Y2LPjn17TBvxdzcEr1A34= X-Google-Smtp-Source: AGRyM1uS6W9+aG8hqQnS0qq8k90NP/43sIXYrWn85UkZwNYqWMIn001BEZUz3vndMkZMWFnsOQqPfA== X-Received: by 2002:a17:906:4313:b0:726:3b55:704b with SMTP id j19-20020a170906431300b007263b55704bmr10225553ejm.398.1657392610462; Sat, 09 Jul 2022 11:50:10 -0700 (PDT) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id g24-20020a170906199800b00724261b592esm832281ejd.186.2022.07.09.11.50.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Jul 2022 11:50:10 -0700 (PDT) Message-ID: Date: Sat, 9 Jul 2022 20:50:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 From: Johan Jonker Subject: [PATCH v2 07/11] rockchip: spl: allow more boot devices To: kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, xypron.glpk@gmx.de, yifeng.zhao@rock-chips.com, jon.lin@rock-chips.com, u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, miquel.raynal@bootlin.com, michael@amarulasolutions.com, dario.binacchi@amarulasolutions.com References: <20220709183130.8039-1-jbx6244@gmail.com> Content-Language: en-US In-Reply-To: <20220709183130.8039-1-jbx6244@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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.6 at phobos.denx.de X-Virus-Status: Clean Rockchip SoCs have more boot device options then currently included in the function spl_boot_device(). Make this function generic for SPI and NAND. Signed-off-by: Johan Jonker --- This patch should replace a patch in the serie called: [PATCH v1 02/17] rockchip: spl: allow more boot devices https://lore.kernel.org/u-boot/20220508150825.21711-3-jbx6244@gmail.com/ Changed: replace #elseif by #elif --- arch/arm/mach-rockchip/spl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index ceef9d91..aab3804f 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -53,13 +53,16 @@ u32 spl_boot_device(void) { u32 boot_device = BOOT_DEVICE_MMC1; -#if defined(CONFIG_TARGET_CHROMEBOOK_JERRY) || \ +#if defined(CONFIG_SPI_BOOT) || \ + defined(CONFIG_TARGET_CHROMEBOOK_JERRY) || \ defined(CONFIG_TARGET_CHROMEBIT_MICKEY) || \ defined(CONFIG_TARGET_CHROMEBOOK_MINNIE) || \ defined(CONFIG_TARGET_CHROMEBOOK_SPEEDY) || \ defined(CONFIG_TARGET_CHROMEBOOK_BOB) || \ defined(CONFIG_TARGET_CHROMEBOOK_KEVIN) return BOOT_DEVICE_SPI; +#elif defined(CONFIG_NAND_BOOT) + return BOOT_DEVICE_NAND; #endif if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)) return BOOT_DEVICE_BOOTROM; -- 2.20.1