Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60ACFC2B9F4 for ; Thu, 17 Jun 2021 19:04:12 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E1449613E7 for ; Thu, 17 Jun 2021 19:04:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1449613E7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B648182B77; Thu, 17 Jun 2021 21:03:51 +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="q2Oua8N6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 947FE82024; Thu, 17 Jun 2021 11:01:20 +0200 (CEST) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 CE783801D7 for ; Thu, 17 Jun 2021 11:01:17 +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=knaerzche@gmail.com Received: by mail-wr1-x429.google.com with SMTP id r9so5827163wrz.10 for ; Thu, 17 Jun 2021 02:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cOv9X4An07b9EygruoyZXjMB87zMz60aTubB59rIlzA=; b=q2Oua8N63BPC6l/kjF2AkEMPiic2Vxmd0bQBhMp7KTc6e4Lmz2OL/2c6wtC8OE4GR/ ZJ425sAPMe4YPL9H9ptWwDLj808YijMZT+TLY52rx/6Z2TV6EMf8Fp2egdbCpqNH0KjX 7fqMtJoCWXmdua+eVXlmcI9o8UWstf030DxfE5gnszvJGgPYHLHejUdJDrYg7Usqc4IL 8w1cG7ElfGDxvOZ2sIPHn+JCYXJ9Tin4mnhgeAkAEknUjyUUViTVxX+Z3rMeybhvZIhD i4BKMMvRemfO2pzLn6H95yV/y3KuLVfxlBFXOATqI8vH6ZG5zN7Sdtcfv8S/x9jt/IEK fCrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cOv9X4An07b9EygruoyZXjMB87zMz60aTubB59rIlzA=; b=r6M5szzKPKybRhW5L6tZoqU226u0iquMg5PWDHDBUntCsZ3/M/AJqDOXUlh7Z15NI4 zAOCUtxgAeCI6BU97LTSCfUZueMdOkt8Xq5kBiRa5d8bOl2gRenIbiyYdhwBhN4eInF3 i52hCRL5SZqoDkrxynvFyMqhlRdJS4wVlpgM1lbD0XmgAOkRkqFQHTUPJXOmM4TkV7Bu ry+1SmAlCAyPryjZ8nrbUq03CgUlCk180Gmn7YDHJ3nRLolg8mz5YR981eLRglHb53mv Fm2lN/7nmDB03Mq0p3KRbmJI4c21lu7e01rmOn8AEdKzEJkLJN0YFTq+RIoLxf7d+Xab mkDg== X-Gm-Message-State: AOAM530S6Cy114Oe9ntw/Lnw/PieHAeYUytaKD0zmdZRPeFfO1RX4T/5 ax+AINiy+RTw8ajinuAyXlfLRzUk0Q== X-Google-Smtp-Source: ABdhPJyXmh3CRHojEGlmTWH68cpF2FKX5SNgYvMKRwlHNxsVhCLbjD9wvySoRkJqaXGyUnx1CYeVEA== X-Received: by 2002:a5d:5988:: with SMTP id n8mr4336502wri.261.1623920477385; Thu, 17 Jun 2021 02:01:17 -0700 (PDT) Received: from localhost.localdomain (ip5b434b8b.dynamic.kabel-deutschland.de. [91.67.75.139]) by smtp.googlemail.com with ESMTPSA id j188sm6685021wmb.34.2021.06.17.02.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 02:01:16 -0700 (PDT) From: Alex Bee To: u-boot@lists.denx.de Cc: Alex Bee Subject: [PATCH] rockchip: Fix MMC boot order Date: Thu, 17 Jun 2021 11:01:12 +0200 Message-Id: <20210617090112.607220-1-knaerzche@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 17 Jun 2021 21:03:39 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Basically all, i.e. rk3036.dtsi, rk3128.dtsi, rk3xxx.dtsi, rk322x.dtsi, rk3288.dtsi, rk3308-u-boot.dtsi, rk3328-u-boot.dtsi, rk3399-u-boot.dtsi and px30-u-boot.dtsi Rockchip SoC devicetrees which have mmc indexes are defining eMMC as mmc0 and sdmmc as mmc1. This means that the rule to try to boot from the SD card first is ignored, which as per comment is what we want and is important for distros, which rely on that. Fix this by setting the correct mmc index, i.e. first from mmc1 (SD card), second from mmc0 (eMMC). Signed-off-by: Alex Bee --- include/configs/rockchip-common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index 0b9e24d1db..ba7061a287 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -14,11 +14,11 @@ #ifndef CONFIG_SPL_BUILD -/* First try to boot from SD (index 0), then eMMC (index 1) */ +/* First try to boot from SD (index 1), then eMMC (index 0) */ #if CONFIG_IS_ENABLED(CMD_MMC) #define BOOT_TARGET_MMC(func) \ - func(MMC, mmc, 0) \ - func(MMC, mmc, 1) + func(MMC, mmc, 1) \ + func(MMC, mmc, 0) #else #define BOOT_TARGET_MMC(func) #endif -- 2.27.0