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 23014ECAAD5 for ; Sat, 27 Aug 2022 03:57:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7A8008420E; Sat, 27 Aug 2022 05:57:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.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 5F5A984409; Sat, 27 Aug 2022 05:57:52 +0200 (CEST) Received: from mail-m11876.qiye.163.com (mail-m11876.qiye.163.com [115.236.118.76]) (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 E393C841BC for ; Sat, 27 Aug 2022 05:57:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [172.16.12.93] (unknown [58.22.7.114]) by mail-m11876.qiye.163.com (Hmail) with ESMTPA id 92CAE3C048A; Sat, 27 Aug 2022 11:57:36 +0800 (CST) Message-ID: <17fb3c78-0f5c-eb60-ef89-a96977854ed5@rock-chips.com> Date: Sat, 27 Aug 2022 11:57:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/2] rockchip: rk3399: fix incorrect boot-device in u-boot,spl-boot-device Content-Language: en-US To: Quentin Schulz Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, alpernebiyasak@gmail.com, email2tema@gmail.com, u-boot@lists.denx.de, Quentin Schulz References: <20220715151552.953654-1-foss+uboot@0leil.net> From: Kever Yang In-Reply-To: <20220715151552.953654-1-foss+uboot@0leil.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJSktLSjdXWS1ZQUlXWQ8JGhUIEh9ZQVlCHUkZVh5CS00dTEIeTh9IQ1UTARMWGhIXJB QOD1lXWRgSC1lBWU5DVUlJVUxVSkpPWVdZFhoPEhUdFFlBWU9LSFVKSktITkhVSktLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OAw6PDo6Iz0rNwE6SCk#Ihco FTMwCylVSlVKTU1KTkxJTU5MSklKVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFIS0xJNwY+ X-HM-Tid: 0a82dd72ae832eb2kusn92cae3c048a 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 On 2022/7/15 23:15, Quentin Schulz wrote: > 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 Reviewed-by: Kever Yang Thanks, - Kever > --- > 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" }, > }; >