From patchwork Fri Apr 10 18:26:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1078 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 731173F0CC for ; Fri, 10 Apr 2020 20:27:10 +0200 (CEST) Received: by mail-pj1-f71.google.com with SMTP id go23sf2736021pjb.2 for ; Fri, 10 Apr 2020 11:27:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586543229; cv=pass; d=google.com; s=arc-20160816; b=NbygLevxbnbcs2bB0aLscfjyPXwA2KkvuCsYUyATnvnPI01JrdAT9kc3yO0wijmogM S5bhJzvgKzHPPt/yEI1YZJ2ZWV7QIma394J/d3mOiGJQi6fVJFw2pcKeLa/yswXeaCBs ZqbbiVLdroJGPnfQ11xzOV+UEYxyT9ozy3Ww3+BRy9mwGxPzoQlGdWDIhbB9Gg2Og93S Jzj3N5bS34luJV6rXkmsaoHUEcQzG8MTzLS1euurbKWJWQj4gKLxNkooFVqTwpHeSvIC 4UANaQD3vNWON4tdDV7BsvijpErDbfqyAp3SDaKU4ATGduFmF5u77X+64aoOMIlGQZhO +tUg== 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:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=gAax+BOlVskyZ/oirKxxBraGnvqtVgRaAUxqvXPttfs=; b=PTazeE1pvo1+FD+rDl7flHFALVzi0FFZ4yrAkwsxNNDRqRC8vhpsYLGfWemUvWV8ZI AzLvdRzOTkjRqw9UK3eonftCd4LIYM6/tb6eeueo6Hb5X3Kc8GC4zUP6ttCCezZoWErZ dDkd0Pqkc3G3QVL+1NZYxQjDASZp5onY2uY/vA1sM/xXQpGa9DtAfdCFxJSrem1A6e9l BhNsBhqVOdswGGlAs5Yy9MlJJ1pTc+4QHX3Z6gkCRRnDXgDbt2blq5Iu82YLzI04pEL/ +oFeqK19/yxChVvOnT9RuSQfeWRjTH+9DWvK7upisPLxmslGpgt8GhankD4sUcC9FOAd Ag1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fR5SDbrE; 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:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=gAax+BOlVskyZ/oirKxxBraGnvqtVgRaAUxqvXPttfs=; b=dQsnEyaYjFpjo8YdgUdQFA6+WJRLniBURB74VhlfgzP8yhZ/moHb65vfuFGS6myf02 d7kkrjDGOYP7p9A14szQk9KeMWRgknn8Y+7iyxyUg2e7sJw5jWIi6TvWfwIb2KZRbpAb HdS4P1eAvuiGDdD/pJ47J3ljPGbBiftTSWi9I= 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 :in-reply-to:references: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=gAax+BOlVskyZ/oirKxxBraGnvqtVgRaAUxqvXPttfs=; b=cqvXja/qgDHO31kiFjM4cCgy4jeCCqNTqWRe6AjHxPGdO17FafAeiwexclbc0f0qh2 A37L1f6tMmrAz1Lfa2zahYdl/Z5fKb5DiHmulI32fdfPWTSd9NokEbIZu9b4hxrsB7yP IFRVxsHd14qEAUjCMDdRyPvkMW3UuBpdTLfcj6DPfRH3J+fBxmcZbFxOjmnzUfMlHlyJ QT6GqwJDOZvmGYGAnSuqujQO93VJmpUXnYP/DqCztK14RYWVolHwmTMEzscRJPTzSy0D bgKtAvzrWub0nn6vlV/yWdbZBKrR9YeQzWspOEa3LSaymkHGsjURp2C7BKXbSdR0mbkr gEhg== X-Gm-Message-State: AGi0PuavOYcdeGW3czXeEYsd0WgWosRaHP6CV7OHH+6aMxBnHRw7I9g3 CBbQBOq2J+6MFJmC6r2BVJ0nDRmv X-Google-Smtp-Source: APiQypJLF8ZT6QXn6d4Z8YI3JEaE2QCdWXoEbS/D2A5CobSUcStjXiL2JCLn7l0PLjpL/U6xarVZrQ== X-Received: by 2002:a62:3487:: with SMTP id b129mr6268261pfa.150.1586543228919; Fri, 10 Apr 2020 11:27:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:c344:: with SMTP id e4ls4862117pgd.1.gmail; Fri, 10 Apr 2020 11:27:08 -0700 (PDT) X-Received: by 2002:a63:5053:: with SMTP id q19mr5723002pgl.66.1586543228357; Fri, 10 Apr 2020 11:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586543228; cv=none; d=google.com; s=arc-20160816; b=L+GxeuXhUHrM6PiUhdwbY1NdZGZTUxEc9xKZV/MP0zQtQvPtliM6aLk0ejC/9a2I4c OMvFg4MLmlJV8varhKfXYvsXj7vZwFMksfdrWs/Tb5jZ5xBMpHAjPqMf6rxb07SQ/W6o ZfTMjDvq1yuLX964mEO004TPlfvHFADuoI9/L8kJEEcmd+3VUwlablq1Uj7vKPQ1H9B6 mkhyhnqgEiB3+hYV57hI64BRBdBDH+fZifiCIqeETgSGz1cDsf6PNKToZ5g1mBIgkoBU k2lwzJqQKx9Di7gqelyFl0x86uKzUMpTcuF624aOyhstvX9Uc39WgkzP+Rxsz9FmfE97 VufQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z5tYs86UgQjVIaZ4/weCq1kZNUCxBsvq1+pNvaLhNSM=; b=QdjR2sLn3qF9Yya8ypJNumMBMNo6bBrRc8t4GYsaCVpclK6N7KlVsdurS3BKwD/WfD 3sCeGs2itK4t+r67AQZfpwSlnIvebrgiy6eW32cWBJXpGHQNZnbJvywp8YpP17IDY9yk AUjVHGz2opscPGW+j8AgzTQHUg0JIOL1aTI0zAVGk55sLOUUKYPEHkJo74dzLc/dcSSP zofjPbnblG9ASLct4Kt6knibPryIhsCLsNx+KKxNd+o2/rrWQi53asRRivaMnbSGzsaW ClM3b68fnSWZmkmu+wGerI1kjdCPsd40VH5Rtx1vkbHBOQHscAzUKAbnbegagaGcivuM JR7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fR5SDbrE; 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 e21sor3865598pgv.71.2020.04.10.11.27.07 for (Google Transport Security); Fri, 10 Apr 2020 11:27:07 -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:a63:4850:: with SMTP id x16mr5744920pgk.317.1586543227545; Fri, 10 Apr 2020 11:27:07 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:e854:42b6:1a5:a40e]) by smtp.gmail.com with ESMTPSA id w90sm2214694pjj.2.2020.04.10.11.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 11:27:07 -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 v2 1/3] environment: distro: Add SF distro command Date: Fri, 10 Apr 2020 23:56:29 +0530 Message-Id: <20200410182631.11951-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200410182631.11951-1-jagan@amarulasolutions.com> References: <20200410182631.11951-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fR5SDbrE; 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: , Add distro boot command support for SPI flash (SF). This distro boot will read the boot script at specific location at the flash and start sourcing the same. This file need to include on required include/config file. Cc: Tom Rini Signed-off-by: Jagan Teki Reviewed-by: Tom Rini --- Changes for v2: - new patch include/environment/distro/sf.h | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/environment/distro/sf.h diff --git a/include/environment/distro/sf.h b/include/environment/distro/sf.h new file mode 100644 index 0000000000..e793be06c6 --- /dev/null +++ b/include/environment/distro/sf.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2020 Amarula Solutions(India) + * + * SF distro configurations. + */ + +#ifndef __DISTRO_SF_CONFIG_H +#define __DISTRO_SF_CONFIG_H + +#if CONFIG_IS_ENABLED(CMD_SF) +#define BOOTENV_SHARED_SF(devtypel) \ + #devtypel "_boot=" \ + "if " #devtypel " probe ${busnum}; then " \ + "devtype=" #devtypel "; " \ + "run scan_sf_for_scripts; " \ + "fi\0" +#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "=" \ + "busnum=" #instance "; " \ + "run " #devtypel "_boot\0" +#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) \ + #devtypel #instance " " +#else +#define BOOTENV_SHARED_SF(devtypel) +#define BOOTENV_DEV_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF +#define BOOTENV_DEV_NAME_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF + +#endif /* CONFIG_CMD_SF */ + +#define BOOTENV_SF \ + BOOTENV_SHARED_SF(sf) \ + "scan_sf_for_scripts=" \ + "${devtype} read ${scriptaddr} " \ + "${script_offset_f} ${script_size_f}; " \ + "source ${scriptaddr}; " \ + "echo SCRIPT FAILED: continuing...\0" + +#endif /* __DISTRO_SF_CONFIG_H */ From patchwork Fri Apr 10 18:26:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1079 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7C45C3F0CC for ; Fri, 10 Apr 2020 20:27:14 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id 64sf2216702plf.19 for ; Fri, 10 Apr 2020 11:27:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586543232; cv=pass; d=google.com; s=arc-20160816; b=Op9ZKHa6gpKiBJjvFAazZl2j7u9EipcGhMVVtU/aYJBtHQpHJjiDhqT8cQZdwAL3OU y1hSoxyIZBl7naIjb9fDeArwdrPLejOyQ6B5k8VSzcIMC+AxBqbR7lPmIYA/0OATlGMw DWH7Lhre+nIWA3ouvG3rHxiizrut/XlrT4STLJhUHI/Aj8LEFIg/LnOJKKTbiumhPulW 8YMhIUjuZg7JKKH+R2bTMX6lYyfr/XpbmeB2ea8Sr/x53UEex0Tq66oJnA5wpcpyvmYi hCH4dDq/ZMTur8lOeIri+2DF+ebZe9Mz1+kZ5XucT/vVwu3epVry9pK1mNLnEIfPyZwM eiKg== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V4+G9TraHwnY+qiVEG63+flwC3Tph9dVAyH1IcUcxwY=; b=mTlKcsWQ2tp7n/PM6KRT3A/O2tXZRzqi96cMqgVaBKZM+Ofs/XeJ2mx3WwbXPwLJZS wyzvIulCA5wHLTxfu0J3NdBd+H5QdPIuBvBAXS+sVPqfPmY7y+jUfxYlM9SHnfMgL6kT i8E12njib2L7MbZ1dGGGlkUeD7LkfAibJEX49oXdfzc++hP7hopVHarKwft5H5aeIeTS ntdbWg1zbZdtoNLhkuStqC18tjGNvtlMuGuMf1DzzBnD9t7boqF5W7F2E3Ne97wJA86m 5ACIYNJgxocQcYwPzyHy6b3nkOOBSMV5BBBQJh51UvKERJGmElSRp24B5nf+OOn4eDyK c6wQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LocK4TRu; 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:in-reply-to:references :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=V4+G9TraHwnY+qiVEG63+flwC3Tph9dVAyH1IcUcxwY=; b=WJQH4Iy7KA1vog3rgjxQ5OBfzTc/+x20QHhXauSJJX7pRlj7LriT5feH4m2/QTSDKf moAQeImTWlLLHHfexZoB8xn5dfb7HtIK6eePahyyuwWX7JEDCsF1ai85Ubk7Sm/c4mzB ccjI4/GHDaIf2LK1ym1m8RFNolP+GbCLdQl+E= 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:in-reply-to :references:mime-version:content-transfer-encoding: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=V4+G9TraHwnY+qiVEG63+flwC3Tph9dVAyH1IcUcxwY=; b=RkcX0xmG9isfXPgXLLp3u/VRcRZu0fyDykB7pRbNzXjtO7TPPZvh898IrbzmffFNS9 M4CrP6UP1CXQJXoOElgPmV9j692eBZpC+H5rwOijAuyR5e9pFPE9hblol+/S5indo+5V 8OSyELQezGgDcMa+Ouuss58qFED6wR85ofzkgRUJ//Pe3XyWoftookZnDBC2g3SpCKSq s02Kuu07rF4y2Fb39EjmbiUjzv1QYZD5vcfmsTC784TL50GoUXtWJ1q7GdTCwD6haEAs rONd3QQeNRseIOsls0p4MZ4MQfJrn1YBiPeAC9WYKqF8V0MhkeFs/ApSmVR2yHoApU+4 VvbQ== X-Gm-Message-State: AGi0PubppFoZpR/GfXjZL1pFAZCjfi4wsY46HAcr5vL8hEQVX+nqIDuT ocumzE+JP06jz/E4RFqgPsnQ8ok7 X-Google-Smtp-Source: APiQypJ0NfOkzhWYBUzgt9YP8VWicxY9XlPlMsXkDIj65xidea6qV58q4DufZNz/CrBx5XdDFne1zg== X-Received: by 2002:aa7:97a6:: with SMTP id d6mr6473728pfq.154.1586543232479; Fri, 10 Apr 2020 11:27:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:19d5:: with SMTP id 204ls1802798pfz.3.gmail; Fri, 10 Apr 2020 11:27:12 -0700 (PDT) X-Received: by 2002:a65:5884:: with SMTP id d4mr5236446pgu.401.1586543231941; Fri, 10 Apr 2020 11:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586543231; cv=none; d=google.com; s=arc-20160816; b=wMsBMxk4DVaH0cvKZcH2DRQGf1I7uJQYoOfp+4jFJ81bj1r1euoIoGqpwSO9fhLHIl lX4sbs5E+mUtV1aMrEGCpg3GzfOXfP1EbrSpMZZAi0/wQe2gelFCEq+88gc3g5F+wVHp 0v4mMBM33YkR5wXneDr9xf6UroWysyU4WAuvmCvz5rPXryQSvfy7V7tNjoPBiM4b24Dw 2pVmk4iojkg8CJhEmfURFA7HkhE6zMgjrC0pYbg4BEsGLP1gWCZH3UF2M86r42EBBRmA yXahCCX77L4Szq83vPn3ObXCpG9w6ahQJmEb9omWl0PC1Mldlw2PVh1Tk37udMqGytDS 9ABA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4R0WqpdYliBRFD6P9shAumdZEaICffalbnt+KRBJLe0=; b=AaZT/xpYjlPBXOy7cBagPzVkBTFqXq4pgBoWwU3CggLiZH665/EMe98tOupvjFa/Rc 7tjFGxmnxxDttt9rgYHnaZsNo9O7afx1xLg9sEy5j35KBrZhT2gqljEe50Jw+zZeCjki wVU73R9Ms4Cq706NC55zgTDsZ0bM/yowxmKS8goRPbZ+r2CkM3yADTcqDTaOlvkdgfcR zXJX3P7ZV2gFNC6dgg4CpEaOtfQlNlIC3Zf+Nj+bKPIrWG5iHu3slne+AFEQU8V0Hm4B rhug18yCh6C1TafoZhMLeFcm2HEEP59LTQMsJPu4JFfXmokEfCru3T/EVaY7hBVggeaR kHFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LocK4TRu; 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 ng17sor3578609pjb.11.2020.04.10.11.27.11 for (Google Transport Security); Fri, 10 Apr 2020 11:27:11 -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:90a:e013:: with SMTP id u19mr7092153pjy.54.1586543231664; Fri, 10 Apr 2020 11:27:11 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:e854:42b6:1a5:a40e]) by smtp.gmail.com with ESMTPSA id w90sm2214694pjj.2.2020.04.10.11.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 11:27:11 -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 v2 2/3] rk3399: Add boot flash script offset, size Date: Fri, 10 Apr 2020 23:56:30 +0530 Message-Id: <20200410182631.11951-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200410182631.11951-1-jagan@amarulasolutions.com> References: <20200410182631.11951-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LocK4TRu; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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: , Most of the SPI flash devices in rockchip (rk3399) are 16MiB size. So, let's use the script offset at the end of 8K.  This way it cannot overlap any offsets being used by software components in flash layout. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v2: - new patch include/configs/rk3399_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index 89a8a44bbe..01a9174bd2 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -48,6 +48,8 @@ #define ENV_MEM_LAYOUT_SETTINGS \ "scriptaddr=0x00500000\0" \ + "script_offset_f=0xffe000\0" \ + "script_size_f=0x2000\0" \ "pxefile_addr_r=0x00600000\0" \ "fdt_addr_r=0x01f00000\0" \ "kernel_addr_r=0x02080000\0" \ From patchwork Fri Apr 10 18:26:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1080 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 09CB43F0CC for ; Fri, 10 Apr 2020 20:27:18 +0200 (CEST) Received: by mail-il1-f197.google.com with SMTP id n18sf3276070ilp.13 for ; Fri, 10 Apr 2020 11:27:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586543236; cv=pass; d=google.com; s=arc-20160816; b=r+hLul91vl8yQUM+5flc3x9zc+S2VSYkKR677WYEQJcvKYvE0fn7VYyn5Mah6194Nl /xpSEVr0a7833SpfDYSMy2x7h/6cBLFUlxlK8eSLnHWeBi5iokmFw5C44i0RJkHEZdri zJ4LCzv8fx6Ive9PA/U6VW9fbnMvTd9odljRLLdVywu+WnlYXXycrImQ3YqMW44vtO48 a7zLoqbNMo7H0Ug+B3VaZR5Np7vLP0pmd/OVb9WiPlf6MrBqNu1SryBZCqYNwXVotQcg wfVWCbxQWBFaMH7voZna5UHm0O09fInFzXtQix3hLcSXGSOHmYi4OjoW1kXiA5hJ+PZW k49w== 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:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=OrD67bn6mZreaw2AhIb1ZK0LZOirfmtOsEMz++OluDY=; b=i4e2G8lhC89GW2/YIYhjJz53OcvXIT/iBCcSjGgoVGEGw9LqV9JuuD+4eikccxPCCC 0dfEUaO3jJfODzQoTNTYiphRQtgPnEPpdj8oIaZH9Xxy9OD0mrE0R8KRMAniDb+GrN5d TAcg7yZbVuzlafoh/4/BMSMvqWiKCHIIf4Ca5Io6Jct4+6Qx83BmqCki/R/ymMjlSxEm OvwrQbo039vX7YN6dqHuMEbPK89fImqS2JBBdzq5AViJpiuDjN6jQn4bjRB9kkLw0mJc 9fnruBDDZ5kcdU/nTv4LhUyosBqroqG9IsS/aRZ8TaKubuu4qzJIBMsLAjLQxv9jtiew H9tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=on14pUjH; 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:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=OrD67bn6mZreaw2AhIb1ZK0LZOirfmtOsEMz++OluDY=; b=eyUUOK7JWed+K14nydNG6neLPXOTIislDq93BQV03ymmqGpdMAjy+mQlAL68QaDOlN UowekixQA6DdTCIcsq1jyHVuMKyQaEi9nfV5S1WV8M8NTBZ5pqzHadd87x4kRmmwdYBP 79ZTafoQCRA8z8GUe9JONEumkC0d76ebYf0t4= 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 :in-reply-to:references: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=OrD67bn6mZreaw2AhIb1ZK0LZOirfmtOsEMz++OluDY=; b=lj5Gv2JR/Rf+PX6Tu+xJ15J1L1g9bQ/SiWvK46l7yibDqQLUu2m8CBxiAEwOnFT7bp 8bu2bKiIOjuBJ59MRVkh8Bw05qt4I+bZidiDZR/KBls32oKXmg305PTh+PlyfYRZU4b1 WK/ZNFF2e6GOFgX8Kq/RzkPYEzbctGqzyZ1jqSn0sMf6QLKs+KrhpBEStiBLGezMle9M ewvZr2ad/ZbSUwIT0FMXYLwOeZhj/y45FzVqkWg6hVkWjFQHIoU2WbMI/YN6kDwlxMK7 ZsHZm8HWcMiuxwmpkJ8KCX0d86SB95lqojWwsF/bvyYcAiF0jns2onXh4Sgtk1s/f7Sk zgxQ== X-Gm-Message-State: AGi0PuakPhqxA2xoQiTyy6Qyx1XRIuoVirFig3iF8yFWMg8+FgCEMPNp 8xL7Zs7FIQZdRMksTWGUfn1D03UP X-Google-Smtp-Source: APiQypJrR/fW3FOVyGKUiqpysLRSRFAYsX669eTMJ9a41i682h1ejhz28iw9U8oWlNPJuoCbRGjeXA== X-Received: by 2002:a92:5b0a:: with SMTP id p10mr6495424ilb.264.1586543236403; Fri, 10 Apr 2020 11:27:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6e02:e13:: with SMTP id a19ls1225474ilk.8.gmail; Fri, 10 Apr 2020 11:27:16 -0700 (PDT) X-Received: by 2002:a92:d3d0:: with SMTP id c16mr6542671ilh.22.1586543235960; Fri, 10 Apr 2020 11:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586543235; cv=none; d=google.com; s=arc-20160816; b=XaVF9cFkMupSb3xBHNqKHbc71nZToIudKtQ39hNYO5Sj+hjZrSSnhs0y55WwE1y+5o 50rfvQ2MWHepzzVLw1YI+wT8l5iG24OCj9773GlPXN65PATh8lcFVMGx4hF3dlR/QwBS 0zTMg41jKJphllerCo+X0d70/WyUD7meBLxUtGQSd6QoTjSViL+vqyhOMc2RQ7+BOdHx YdYaNujhRCSVEmPjSZYyx5FAyUGyR7yxzM0zd3o12XHRRhtl6f75v/qrHrTomeWYrD97 mvrF5TNuqUpJMnUoZnSz8aWSaxdi4RQ28qSBnmrrvR1/0zrMQfRHegEH6hDf1utIADQ1 npwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RDC+S2pPClJt5MdFcAtW3zyRo5LPh1rQa69WeWQdF5c=; b=lQt7l+NdaBxQ+cysHV2JxrYzusZXZRG/bV58WJmGBX6OAlzWV8bBfN541JXSjMcz+e l6Oomb8LGLCIXVKVI+aotLS8yO3KVhR7r7Q1AxYiNH5eGYiIIk0QLE5QD3YIWoyo4l/C 89eSplN3DTYSg4Fb9pe8Y5VKkGlrmP1W5Xf16WeXqDBfRnCg/LF1gWzi2bray4dMPmGT KGy7cw8iOmvf7hT5Dg9P8oSQGoHReHcBMFncno85zxp8ag3QV5oPNqIgq78a3QfBo1Y/ 3jS8mNXFaIIgnKZ+XusgdZRiCslbpjyom7qTAEuhKwgf0k8U78eorDveqcQI478UEYsF 7Tzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=on14pUjH; 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 l13sor2395307iol.75.2020.04.10.11.27.15 for (Google Transport Security); Fri, 10 Apr 2020 11:27:15 -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:8d8d:: with SMTP id v13mr5948511plo.260.1586543235176; Fri, 10 Apr 2020 11:27:15 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:e854:42b6:1a5:a40e]) by smtp.gmail.com with ESMTPSA id w90sm2214694pjj.2.2020.04.10.11.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 11:27:14 -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 v2 3/3] rockchip: Enable SF distro bootcmd Date: Fri, 10 Apr 2020 23:56:31 +0530 Message-Id: <20200410182631.11951-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200410182631.11951-1-jagan@amarulasolutions.com> References: <20200410182631.11951-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=on14pUjH; 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 --- Changes for v2: - update BOOT_TARGET_SF include/configs/rk3399_common.h | 1 + include/configs/rockchip-common.h | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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..d97395db90 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -41,11 +41,18 @@ #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 + #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_MMC(func) \ BOOT_TARGET_USB(func) \ BOOT_TARGET_PXE(func) \ - BOOT_TARGET_DHCP(func) + BOOT_TARGET_DHCP(func) \ + BOOT_TARGET_SF(func) #ifdef CONFIG_ARM64 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"