From patchwork Tue Apr 28 10:04:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1130 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3DA453F077 for ; Tue, 28 Apr 2020 12:04:40 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id t2sf19772495pfc.15 for ; Tue, 28 Apr 2020 03:04:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588068279; cv=pass; d=google.com; s=arc-20160816; b=WfINBafanff9igVq1xdqV2Cc+LN9ymqhJ2dAXwk67mkI7K6eP0np1hsvePpNkp95eS bukcWxllAtAzrvdn56W9V766LFiESHSmsp0K6r0/hRvoYJTjXruzg5f8GfR+KahuVqU0 KqiwArpKwO04c9+WSsCHFqukquQGK/EEReD7qBHAZl21nYeeNYU868U89zPx8RIC5Tmc FHdCMCB/TS7IeznkS379PeUZdjUaBnvL7DGqnG1ITlm7kqYl0PKlvbloFi8TFNcIJGv+ xV3t8ALqVSkEY/F8ShBkjeoTAwJ/pglYsGeVQY8qf62aEKSZPOpjU0t7YJgaBcDTvuxg lsvg== 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:message-id:date:subject:cc:to:from :mime-version:dkim-signature; bh=lZ8w4CTmVvjqzUqHl5rbBtNFF4VV74hW6jRxQUvFEnQ=; b=sPRtJ4NhEYCiQfhFfNDi/cDvKuAz/ppg4He1heMkH6LNtbWRVwaol9VFNoUohUbVXV dBFaexNCSPGy10XPv2wQIAadbsCZlz7aK1QdNdrjq3IXslEi8wMIxono1NmyH/6B0Q9O ApdmYin0Mav2uOSJXI8Ot0l38NSFvBUZWn8x+LXUq2u2K+9+uGRZwxxyCeOZc58IuWhb JeDhoOifC7AJH+fmWTfkAV5pP20epGO/C4jN+2wNvmXyXCyFYO/5qKUA2/GGPzRTEVsa Ipr1l7498vRnpZuczxxr6RnSz/i1/LPUqKw9LbDM98d2HSyRb81l712sybFqPsfgqLCb 4Rng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H9Ghycoa; 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=mime-version:from:to:cc:subject:date:message-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=lZ8w4CTmVvjqzUqHl5rbBtNFF4VV74hW6jRxQUvFEnQ=; b=n40XtJjcNI1Y1Awt3BiiiTKptMFGrXLUgg4hYmKUQATGOShpH2gZ8cUUxT2hQod0pt 5wpTUGGTzRBVfT7KCeUSw9HunMyOtQEKFIlTOAsuvcQuq9E914rnjD9+8dLllxUbiEaD +H+rvftB9dMl5h0OM35/Bp79bxa70gahHxtBs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :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=lZ8w4CTmVvjqzUqHl5rbBtNFF4VV74hW6jRxQUvFEnQ=; b=IFgOspH2aRMn88mLaZzZ0cWp7RiMAlfhO3wSldKkWd5RIbPGhzimRhzLYN6cmigklF sc1aWh0F3rM37o/o2e3oTnGCvQJ8h9Ne09mzYYNNz0Cj60qPRySqH2xGk8q2aNGKg1we gllo8ZAQK+Emaw3Nb5Rj2INaaMVJ6xIXIt/cFyHqZU9cddzXFonm7NwAZ97oRhClAWuN 5LFLZA0t8hjFx3+NMisk5G5BxXaQ8sekmun73smwcG7Hr1odyuzRLyIiBhc6J4WbeBJg vvVuO5N1uKaOZSD+dbwe0iYarZZSCCMDSNfMyNIGBZA2WiuWf43LTHwdBKHSUDS6+IPC cimw== X-Gm-Message-State: AGi0PubvgtO8Obcyl2b2NRpo7R352KAiaJF3p3Upma1Mfd7Nd+rZBOmj /Vr6Hz2eTuW+DABAagIe9lswrqgT X-Google-Smtp-Source: APiQypIXcI0QOUH92V4+qhxoMBaGPeFtAfrkA7tYsH3Fg6o6QhVsGdt6DxCB5vUzVRvUjSHQBp4b0w== X-Received: by 2002:a63:b302:: with SMTP id i2mr14958860pgf.365.1588068278996; Tue, 28 Apr 2020 03:04:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:3682:: with SMTP id d124ls5434111pga.2.gmail; Tue, 28 Apr 2020 03:04:38 -0700 (PDT) X-Received: by 2002:a63:d60a:: with SMTP id q10mr28050990pgg.37.1588068278431; Tue, 28 Apr 2020 03:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588068278; cv=none; d=google.com; s=arc-20160816; b=dnAGMQGeN/5OaBDY7L6dTZbMICxe4836HNNWpSWt3m8XKWGWM0S21LfPjEiuXZkzm8 htbUJOtDJSkWf2PzJuASctacTpfU1pBshkYvVM9+xoZPHwjt6NNJ62JIZhTqokESOqAL 8hNK09u7hrx6tqRafcae0lN+h24zOGl3PVYDDEYVEJTMKVUnesw1gufmN2EhjQgyrS2P 6pUWdACVbeBJu1tQQmgRchB1uvjrq4HKzdfrKwYu9cjmhQmcoHpGpiRCbZYH1ir/FpY2 YE7a80H0yraQYooM4N6MK3QnnrVMc6cxY7qqCJ0XXFD6IlEKKFwn2d31NVYGYaB17kM2 jqxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=dj2JffsxWwDEEgPJvlvIrt5V+mtaCSl+DtFHop0dMb4=; b=Bv8xFUEvnpcl6sNEECDObe+ckY+1tHCsluZgrHOUasnNvO1xxeJZw340z+LXcUpbC8 MqBQyBa32Ydi9+TtFqRYqychn6mz9J0sFBk1mPHBVfxV2C+5tAYVfDfzMbxqCGjgMAT+ l+OlqaY9r3R13Sa3Fv/gotTQJ5PgONaidvHkx9uGVm9rWXEayWVy4C7CMwbLJbR1pZRd ZbzNVMfeFF/tP6QKI73L6oSwZTcwCf+Wu+CyLCQ/Z1C7/2MjO2avsEE3yIMK8m2e8xkd zVd4DP66egdldE2FiH/Prk4um832UApIcyH6iAIbV9dsaMXj6Vjn63hS6/czIEn3g2Lo kIJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H9Ghycoa; 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 s17sor23748945plq.2.2020.04.28.03.04.38 for (Google Transport Security); Tue, 28 Apr 2020 03:04:38 -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:a17:902:327:: with SMTP id 36mr26866546pld.185.1588068277876; Tue, 28 Apr 2020 03:04:37 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:f9c1:1c6a:49dc:267d]) by smtp.gmail.com with ESMTPSA id dw12sm1665504pjb.31.2020.04.28.03.04.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 03:04:37 -0700 (PDT) From: Jagan Teki To: Tom Rini , 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 v3] rockchip: Enable SF distro bootcmd Date: Tue, 28 Apr 2020 15:34:28 +0530 Message-Id: <20200428100428.19739-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H9Ghycoa; 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: , Enable SPI flash(SF) distro boot command in Rockchip. This distro boot will read the boot script at specific location at the flash and start sourcing the same. Included the SF device at the last of the target devices list since all the rest of the devices on the list have more possibility to boot the distribution due to the size of the SPI flash is concern. Cc: Tom Rini Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v3: - Don't use SF distro px30 include/configs/rk3399_common.h | 1 + include/configs/rockchip-common.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index 01a9174bd2..f0ae6e67a7 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -60,6 +60,7 @@ #endif #include +#include #define CONFIG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index b55e09a9ca..2d5d29849d 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -41,11 +41,26 @@ #define BOOT_TARGET_DHCP(func) #endif +#if CONFIG_IS_ENABLED(CMD_SF) + #define BOOT_TARGET_SF(func) func(SF, sf, 0) +#else + #define BOOT_TARGET_SF(func) +#endif + +#ifndef CONFIG_ROCKCHIP_PX30 +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_MMC(func) \ + BOOT_TARGET_USB(func) \ + BOOT_TARGET_PXE(func) \ + BOOT_TARGET_DHCP(func) \ + BOOT_TARGET_SF(func) +#else #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_MMC(func) \ BOOT_TARGET_USB(func) \ BOOT_TARGET_PXE(func) \ BOOT_TARGET_DHCP(func) +#endif #ifdef CONFIG_ARM64 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"