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 D8453C433EF for ; Mon, 18 Jul 2022 21:10:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC2A583FDE; Mon, 18 Jul 2022 23:10:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat 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 3732B84019; Mon, 18 Jul 2022 23:10:55 +0200 (CEST) Received: from mx1.tinet.cat (mx1.tinet.org [195.77.216.146]) (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 7FCBA83E4C for ; Mon, 18 Jul 2022 23:10:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xdrudis@tinet.cat X-ASG-Debug-ID: 1658178651-163e7b70c479b8d0001-4l7tJC Received: from smtp01.tinet.cat (smtp01.tinet.cat [195.77.216.131]) by mx1.tinet.cat with ESMTP id N9eOjTcvDRZtZWJ6; Mon, 18 Jul 2022 23:10:51 +0200 (CEST) X-Barracuda-Envelope-From: xdrudis@tinet.cat X-Barracuda-Effective-Source-IP: smtp01.tinet.cat[195.77.216.131] X-Barracuda-Apparent-Source-IP: 195.77.216.131 Received: from begut (99.red-79-152-185.dynamicip.rima-tde.net [79.152.185.99]) by smtp01.tinet.cat (Postfix) with ESMTPSA id CECD3605D0A1; Mon, 18 Jul 2022 23:10:50 +0200 (CEST) Date: Mon, 18 Jul 2022 23:10:49 +0200 From: Xavier Drudis Ferran To: Quentin Schulz Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, alpernebiyasak@gmail.com, email2tema@gmail.com, u-boot@lists.denx.de, Quentin Schulz Subject: Re: [SPAM] [PATCH 1/2] rockchip: rk3399: fix incorrect boot-device in u-boot, spl-boot-device Message-ID: <20220718211049.GI1686@begut> X-ASG-Orig-Subj: Re: [SPAM] [PATCH 1/2] rockchip: rk3399: fix incorrect boot-device in u-boot, spl-boot-device References: <20220715151552.953654-1-foss+uboot@0leil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220715151552.953654-1-foss+uboot@0leil.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Barracuda-Connect: smtp01.tinet.cat[195.77.216.131] X-Barracuda-Start-Time: 1658178651 X-Barracuda-URL: https://webmail.tinet.cat:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1978 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.6432 1.0000 0.9798 X-Barracuda-Spam-Score: 1.48 X-Barracuda-Spam-Status: No, SCORE=1.48 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=6.0 KILL_LEVEL=8.0 tests=BSF_RULE_7582B X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.99471 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B 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 El Fri, Jul 15, 2022 at 05:15:51PM +0200, Quentin Schulz deia: > From: Quentin Schulz > > On RK3399, mmc0 is eMMC and mmc1 is SD card, c.f. console: > MMC: mmc@fe320000: 1, mmc@fe330000: 0 > > In arch/arm/mach-rockchip/spl-boot-order.c:board_boot_order, the > boot_device (BOOT_DEVICE_*) value is gotten from spl_node_to_boot_device > function. Said function returns BOOT_DEVICE_MMC1 for mmc0 (eMMC) and > BOOT_DEVICE_MMC2 for mmc1 (SD card). > > Since the SD card controller is at mmc@fe320000, it should be associated > with BOOT_DEVICE_MMC2 and not BOOT_DEVICE_MMC1. Same applies to eMMC. > > Let's fix that by swapping the two BOOT_DEVICEs. > > Cc: Quentin Schulz > Signed-off-by: Quentin Schulz There's a thread here on what the proper naming would be https://lists.denx.de/pipermail/u-boot/2022-July/489155.html I agree it's not been consistent, and I'd do it like in this patch, but I don't feel strongly about any option nor pretend to stop any discussion. Tested on a Rock-Pi-4B and didn't see any regression. Tested-by: Xavier Drudis Ferran > --- > arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c > index 691d69dc59..f280cb1dbf 100644 > --- a/arch/arm/mach-rockchip/rk3399/rk3399.c > +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c > @@ -180,8 +180,8 @@ const char *spl_decode_boot_device(u32 boot_device) > u32 boot_device; > const char *ofpath; > } spl_boot_devices_tbl[] = { > - { BOOT_DEVICE_MMC1, "/mmc@fe320000" }, > - { BOOT_DEVICE_MMC2, "/mmc@fe330000" }, > + { BOOT_DEVICE_MMC2, "/mmc@fe320000" }, > + { BOOT_DEVICE_MMC1, "/mmc@fe330000" }, > { BOOT_DEVICE_SPI, "/spi@ff1d0000" }, > }; > > -- > 2.36.1 >