From patchwork Sun May 24 14:56:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1221 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0CB2F3F0D6 for ; Sun, 24 May 2020 16:57:07 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id t13sf11615256plo.6 for ; Sun, 24 May 2020 07:57:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1590332225; cv=pass; d=google.com; s=arc-20160816; b=P/48PCTB/dJvr456P8myJ0GqCd4utDWikQ6ztGtCsVMs4y93cChq6F2VF5nFMaGpNx KGF2fSGe0ApilbsnREWIbwHcAjo6biZcShEWahF7T/N0qLtbndjmP/aWsmshVrVXRm4q C/LDwv80B+8kbcE9fIUDtni9qqMMfeoOhPdCgB5gSQteNUusKBVKh2/+qyr4tfso9Xdb O2DvCyr/sHEmIf/FJHNgxYkw8u0iMk/AmbhaRxvhEtVWkQoH/xi79fUE8Mr7nCWJz09u JWcq552KTKBjCCVKvET6LqDNVPv9RKO1LTvGZnQYQY3aAWoQMvmGxzSAMaDmxkikGzwK fJoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=EkBuBJsSanN9AibuJQJVeMu5CfW6uULtRudemi/nQ50=; b=B4DZMSEjTi/5Q58Q9HEkrj3bEZGbWuQGyt7KWEkApmTuM6Dfvn0UcojdlO+xxlbwHp CamH4rTUcRjvzxj5Dh+hO1eo1z1tbbchiuvyR0+Tdao0FQe93w/Vm4r1xvS4HS//1738 4Bf9rwFf9wrT9uLyL5Gdu5117duhX+x7bNxMYzpHdABo0fKiMPFbLsBetgu42K7i6+k8 0yeLAjBcwccnucAJo3i2oqII+RxuS3zFAHu5s/i0aj3CH8mVtwxxYmHZhFm/TuLrZJ4D AoeyuIJQBv/D70Y9p1mAC+ilseZXDge3S4LnDOF74rCX/5c1AstIbBUlacyVuK17nfAm tHcg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H+hsXRQg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=EkBuBJsSanN9AibuJQJVeMu5CfW6uULtRudemi/nQ50=; b=k3qbEIU0PIuQxAFYNFPfOYk6CmShhRhhBzX/xsL3qRBp2/YaxB7tU0RpwSdf8WXz3O hPoNiKFRqMZLL0ceSKKekPVVQcQhAvu0xLJfabPGJbS0I3+m+7aulFQqyfIJ+qG0Hc8Z +qjrOLlSS2g8GGh4c+JdHxSTEr0zTcTxC6U/A= 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=EkBuBJsSanN9AibuJQJVeMu5CfW6uULtRudemi/nQ50=; b=HE03APo0raT/kULv3xU0dreAo0SZjqYq+jzvsDawEYTnDxMV7xcXNQVfrOsr1V0R7d KxzuarcM5r6oDBtt6IQ6uT54iclk5T2G+RINwGw6c78o1zzIEayvmORIPmdSpv4O98LS r6vZgzJRQ1R7ZOLMSMsZtJ2XZQ1LxYdErEJSySjh51xvQuZcaqH+i7Ig0L7/rdoDqj6d cIrzBCzlWR1876J8kNYUqG24Pa78zDIUBxt3VKo67f+RCYTnBon07CBnesgxtcOBkZls sNrsoOvudwzVa1O4f5vGUJqu/MUZyZeBUVN6hD+/kwM8bMOGmq2lUjiBFvUpXv8djsry ojJg== X-Gm-Message-State: AOAM533Hpghdyp5xRJxHka/KFy57L7meJl9fA2UFcc9kfcjvUcsWtUaE J7l6StyH2CRV/N83l7gRya0QwOXS X-Google-Smtp-Source: ABdhPJx4xFrXmT4T732gMnKvqYDGF/ScKaR1O/UBU5l+TRhmCf85YaPhInri+tprO+2rEgWxwgzesA== X-Received: by 2002:a17:90b:1008:: with SMTP id gm8mr16173509pjb.137.1590332224499; Sun, 24 May 2020 07:57:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8d95:: with SMTP id v21ls2840504plo.3.gmail; Sun, 24 May 2020 07:57:04 -0700 (PDT) X-Received: by 2002:a17:90a:21e5:: with SMTP id q92mr14367718pjc.63.1590332224000; Sun, 24 May 2020 07:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590332223; cv=none; d=google.com; s=arc-20160816; b=hgPm01ysI708GD22PZwIHvNPLHG6ktwvgcKTlwR4vj7E2nHU/g5Eow5fREmXd9BvL/ PkUFfQk0trt7DkUhJLsoPvVhbw6wfsEmEtBr/jwyLozD/ujtX182hcikVMRHW+OH0ceB 94uXILRQLXVKgJ09h0AhnztU01l7ORJqXXD5PSZby4bs+ZP4gL4Fe2Vgp+pmI4hhb+pK f4z/ow2UUYul61/HZx1YBmnu1M3GdkAjZnTJFyU90HJO1o/XNSap6BRdtyJLyFPTgeWg uan7QyoVYCCANPx14mtLuacJqDDbmgVk2vXcuUGvYYqfdL3M9ErnJVgXyBe4nyzo6EJP V0dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=pctsjZ/mAtUZR10Nqi230zXhBDHFH2SKQuSgTiXpBc8=; b=tsmjwo0UvBk0JnjPD4WXPkOhuUqAj++i3OPrSB7WMU09hmO4GnuGpctqO5F6MJPN3F 8vyvj787A6yq7GePfl/U7I+Wy8zl+ghxqjQUJy0ur0WpX7IhvuDLJPKH7WC4asBK/P8E 8+VjAQl+nV9D1lDHX3iUReNMT0UV9mpiLZ17Q772O/ZgHurhWEu7fNbwF5UoZioMIxrf XjWkSrIndwqGV0jr1tDhIJKFuwpw3miJ1XMReU2ZosaxKQ7tZMSyh+/Sz3o5AOOxDvD0 VvrT1Z3HIpsoCdfGL+QaKK7zpjQSAmWyrADxXnlO8tef/+YKRqaW5oTnrwBnO64sgz4P Wa9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H+hsXRQg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m26sor19104852pfa.40.2020.05.24.07.57.03 for (Google Transport Security); Sun, 24 May 2020 07:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a05:6a00:82:: with SMTP id c2mr12351101pfj.118.1590332222712; Sun, 24 May 2020 07:57:02 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:9b1:856c:6c2b:bde7]) by smtp.gmail.com with ESMTPSA id w12sm10974245pjy.15.2020.05.24.07.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2020 07:57:01 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: sunil@amarulasolutions.com, u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2] rockchip: Fix spl mmc boot device ofpath Date: Sun, 24 May 2020 20:26:18 +0530 Message-Id: <20200524145618.78951-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H+hsXRQg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Linux v5.7-rc1 dts(i) sync has changed the sdmmc node from dwmmc@fe320000 to mmc@fe320000 and this ofpath is being used in rockchip spl bootdevice code. So, update the ofpath with a new node name and prefix "same-as-spl" to missing u-boot,spl-boot-order. Bug log: U-Boot SPL 2020.07-rc2-00256-g9c5fef5774 (May 24 2020 - 20:20:43 +0530) Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC1 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices Fixes: 167efc2c7a46 ("arm64: dts: rk3399: Sync v5.7-rc1 from Linux" Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v2: - prefix "same-as-spl" to missing u-boot,spl-boot-order arch/arm/dts/rk3399-evb-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-ficus-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-rock960-u-boot.dtsi | 2 +- arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++-- board/theobroma-systems/puma_rk3399/puma-rk3399.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/dts/rk3399-evb-u-boot.dtsi b/arch/arm/dts/rk3399-evb-u-boot.dtsi index e5659d7999..0bb50b01da 100644 --- a/arch/arm/dts/rk3399-evb-u-boot.dtsi +++ b/arch/arm/dts/rk3399-evb-u-boot.dtsi @@ -8,7 +8,7 @@ / { chosen { - u-boot,spl-boot-order = &sdhci, &sdmmc; + u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; }; }; diff --git a/arch/arm/dts/rk3399-ficus-u-boot.dtsi b/arch/arm/dts/rk3399-ficus-u-boot.dtsi index f3f7aa7c45..38e0897db9 100644 --- a/arch/arm/dts/rk3399-ficus-u-boot.dtsi +++ b/arch/arm/dts/rk3399-ficus-u-boot.dtsi @@ -8,6 +8,6 @@ / { chosen { - u-boot,spl-boot-order = &sdhci, &sdmmc; + u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; }; }; diff --git a/arch/arm/dts/rk3399-rock960-u-boot.dtsi b/arch/arm/dts/rk3399-rock960-u-boot.dtsi index 82f2c311af..c190089e26 100644 --- a/arch/arm/dts/rk3399-rock960-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rock960-u-boot.dtsi @@ -8,7 +8,7 @@ / { chosen { - u-boot,spl-boot-order = &sdhci, &sdmmc; + u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; }; vdd_log: vdd-log { diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c index 09b0d6ebe8..4fda93b152 100644 --- a/arch/arm/mach-rockchip/rk3399/rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c @@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR; const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe330000", [BROM_BOOTSOURCE_SPINOR] = "/spi@ff1d0000", - [BROM_BOOTSOURCE_SD] = "/dwmmc@fe320000", + [BROM_BOOTSOURCE_SD] = "/mmc@fe320000", }; static struct mm_region rk3399_mem_map[] = { @@ -176,7 +176,7 @@ const char *spl_decode_boot_device(u32 boot_device) u32 boot_device; const char *ofpath; } spl_boot_devices_tbl[] = { - { BOOT_DEVICE_MMC1, "/dwmmc@fe320000" }, + { BOOT_DEVICE_MMC1, "/mmc@fe320000" }, { BOOT_DEVICE_MMC2, "/sdhci@fe330000" }, { BOOT_DEVICE_SPI, "/spi@ff1d0000" }, }; diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 561579d056..f7f08ae617 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -77,7 +77,7 @@ static int setup_boottargets(void) } /* - * Only run, if booting from mmc1 (i.e. /dwmmc@fe320000) and + * Only run, if booting from mmc1 (i.e. /mmc@fe320000) and * only consider cases where the default boot-order first * tries to boot from mmc0 (eMMC) and then from mmc1 * (i.e. external SD). @@ -85,7 +85,7 @@ static int setup_boottargets(void) * In other words: the SD card will be moved to earlier in the * order, if U-Boot was also loaded from the SD-card. */ - if (!strcmp(boot_device, "/dwmmc@fe320000")) { + if (!strcmp(boot_device, "/mmc@fe320000")) { char *mmc0, *mmc1; debug("%s: booted from SD-Card\n", __func__);