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: 11483531 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C64D915AB for ; Fri, 10 Apr 2020 18:27:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3E5B20757 for ; Fri, 10 Apr 2020 18:27:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pu7yZN2U"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="fR5SDbrE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3E5B20757 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=e/D2lN7U+Ea32s/tm9DCQ9jgId0ygdi2UEGRHfWfywg=; b=pu7yZN2Upv8NDfTl5HeWgbDfW5 eidqvGfwfwC7izwNlwhE26u2ZIOTZnh7/TK7D51TFv3GQTpLJ1nyBik7bGaAuCwnACN46OJDghsqw m6ktCNEj42uXs69GhvduBB0VyjO1Hbt0s4o6UpWNF9MYrN8AaNRFelMrF79IS5ElGSl4wMhFo6xHS L7HVNjFaZaKgGc8UYKni/EO/nmJu6KyDrY3H+7XQTLlgnQUylXe6Los20E9wqsjLZFq3N4q+yrD85 OlWiUFtz6FBfIkJ1s822N+MgmBp3zqXY06kSxT09nVhSMaH1DbYDIkoSipg58fUxTmcKZG4O8FIH0 /h+wXMOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMyMy-0005GZ-37; Fri, 10 Apr 2020 18:27:12 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMyMu-0005Fp-KD for linux-rockchip@lists.infradead.org; Fri, 10 Apr 2020 18:27:10 +0000 Received: by mail-pg1-x544.google.com with SMTP id x26so119256pgc.10 for ; Fri, 10 Apr 2020 11:27:08 -0700 (PDT) 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; bh=Z5tYs86UgQjVIaZ4/weCq1kZNUCxBsvq1+pNvaLhNSM=; b=fR5SDbrE/kwrvKbyxKoJ+oLSvqBGlOVZPcVpdhxuGlaqGtbIBDm72SLl4gkWgPLYae FeflxyQhclynA8d7ZbaDFL5AZT31bf8XFZiaInuOzCFey+ZXrhZ0SJ9CH4QMv7AlXVp8 vpzA2brXoGWik9RAiaAGm74ym+x+KOwfCp6Mk= 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; bh=Z5tYs86UgQjVIaZ4/weCq1kZNUCxBsvq1+pNvaLhNSM=; b=KBi5fix++ROsnOXje/Mfjv3B1GBoYEpIQphJ8VPAb22HLrdWN9xFIc3rLkCRpCEp+x 5te7STzKIzU+rjHHLdyWbtg7ZmbEUi6xpNGlJh9HweKBMN/ffWOnlHpU1CWSrn5ACyw9 rpKsXj25v70o43wYTqA9SghQpzaPInTiENbNu6btTOO2a+YksbyCku84ZDng/o7MDhS3 u2ZnuBAKBiyDmWFcXhBmUga0pJBleG3PLGU6HVzJYiNOxFsDzEAFH4MMthBIfW43MUcX QAHDjC2818nPnfLXOd+OtuCNRR0v/EIfBnZMApmUekxZclxjIVmjASygOUafMdNt4TDG ttjw== X-Gm-Message-State: AGi0PuYh0qoxtm4+ga0pm9GfiNH1NLj37bMxnZJBqiP5GCB/RSSKzPqC kF5O2Pw1i0ttz9S/+yzzpN0FSQ== X-Google-Smtp-Source: APiQypLk9jRXjW0b97m2hNQOFS9N5OXJi0zHYsiP2Kfg9e+LQuYOYfGMGbvBCCMl0JTkNQzkY93Weg== 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200410_112708_999422_5C80ECFB X-CRM114-Status: GOOD ( 11.70 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:544 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , sunil@amarulasolutions.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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: 11483533 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E569392C for ; Fri, 10 Apr 2020 18:27:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2A0020757 for ; Fri, 10 Apr 2020 18:27:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="chmmUjiM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="LocK4TRu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2A0020757 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iQ5BiAaKHTgshgBYjFtgqwLZA/GdeN9G2qQ5rW/2u0I=; b=chmmUjiMilEVbk IxxFz9Gr7qDi0jRgaEb8vgkZWh5faXPuot/6dwTjpJ0oSbNRQXhsFZ3R5YyLYD73WQDU5X1DIy41j vW1Rboar26t9yIQrItYU4rUfh90XWcFAVZqqG3VA6Pl1loCIJibjvLdhlyecpTnIZ3xWVuW2HgZ9q eTgXMgnChnXvLj4khqDvQD1yUfnNfEC0oKN2DUFzzG+dBcbLkqPOQ9Tg1UePqfq9BcCSpnwQIrDYb RUzW8erpKozvab55WoOGoeK8AQn5NvvaPnS5hfnRy9MfZbCGM3rASfYEREvVpiYM9dHXGIssTPXAa BjubAnqv/0xCf39IuTAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMyN1-0005JY-FD; Fri, 10 Apr 2020 18:27:15 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMyMy-0005Ga-85 for linux-rockchip@lists.infradead.org; Fri, 10 Apr 2020 18:27:13 +0000 Received: by mail-pj1-x1043.google.com with SMTP id z9so1037636pjd.2 for ; Fri, 10 Apr 2020 11:27:12 -0700 (PDT) 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; bh=4R0WqpdYliBRFD6P9shAumdZEaICffalbnt+KRBJLe0=; b=LocK4TRuI03fDkY8AakJTCMBC6LP9e1tza+dnQCgzeQVgKY7DumsyvaDx7SDoqbloa rJC4WoTHUqSWJV09iDpNLFaMph11/34JAOFXzR3B+w22lKdnTzy0+FvpzWIR+utTw5mA orND4Ky+vdWuHJteFs1dI4juoRkh2Z9dOGvWI= 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; bh=4R0WqpdYliBRFD6P9shAumdZEaICffalbnt+KRBJLe0=; b=ozlUFDdH/zKSn2MzuymsIH8Ontr9fuQNBHBpNLeHD5ZAz/7GYKuNc7cst6XKJPOeig W8bwpxSiINrvUyzsZTv/Pik13VEnskka71lXLRvh0pQtlrMrjWDx06lxZYxT5N5Bj/iA 6WCrSs6jvu4w/UQgQJUXUFq1Tz6+2jodulhVCDYV5JR/vagru1w5XjIXJUSAKVnqZJCV 40LtXYl0T1EQvq5EKzkMTLk3Y3POK+xDBLHn/811IS07M9vuLCXcJIPtsckqKw1tkXOl nevjdc/ldMxyQjok0x1b0bGGJ7bw1FXR6At//1CTJizqO+de6yHJXFdhZpKZon31I259 YZsQ== X-Gm-Message-State: AGi0PuauAyB9578JNXkVQELxvH96M/nWbM9qvKt0CYereQcY/ZjYNokb cBzU8jpVLwuBHl7WmEW59zS2ZA== X-Google-Smtp-Source: APiQypLxmT/b5FSPx1ghgyQBX3kResB1HB+BcBm9Ve5qDlTg9IzEExyh8vbbDdeyBJs8hfvQvCO/cg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200410_112712_293323_DF722280 X-CRM114-Status: UNSURE ( 8.78 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , sunil@amarulasolutions.com Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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: 11483537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D6D492C for ; Fri, 10 Apr 2020 18:27:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E01232082D for ; Fri, 10 Apr 2020 18:27:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QncXxc/U"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="on14pUjH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E01232082D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=T6jwYfzPwGcG2H5xYwIriVXQ+rU2LoTy5usx71NFW/Q=; b=QncXxc/UXhOvTKVOXU85RIC61Z XMmWEc5eQVEnbN8rkrChU7zd+/N/m9gkTfMilnlH5jq1YDEON4PeBPJLgSl1BiUrwUOs9VRWrMmpa NcOZT2RDkdEr7v5ytgRRAEZIJu5DFY4mMOG8vdfBKvV2kC/A0LCzzANyahRrioCckQPZfTlO4tkOG 3KZPYHu0kj+3EZ4zarucj5SnXJjL/M12j9vB1umyeBQNFpO3aa0qRe8XhZOvfWXCEEgfpzPj/QnJ9 Xx835kH/5MvokYytMD7aMl6HMiY7VyhxEoBN0TKrG51SmUnsck2qKVK3OvLYZBn6NVcuHGwD4Cy75 LICnPG3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMyN5-0005NQ-M8; Fri, 10 Apr 2020 18:27:19 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMyN1-0005Ju-Vm for linux-rockchip@lists.infradead.org; Fri, 10 Apr 2020 18:27:17 +0000 Received: by mail-pj1-x1043.google.com with SMTP id nu11so1039248pjb.1 for ; Fri, 10 Apr 2020 11:27:15 -0700 (PDT) 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; bh=RDC+S2pPClJt5MdFcAtW3zyRo5LPh1rQa69WeWQdF5c=; b=on14pUjH8PmO73uLo3op2NNL5QZ3ov0OvvBfIIXOOT4BLwpQyGlNnBhcNA3LFbe1fb I1nUvAGXLW5CchHyalrGRFKwQP8CN3ZZbVJ2G7XUoXeH9soQgFiUPvM5Im/W/HFGZ8Tx xx+iW9eHtmryv9a3X3Ve+uGh1c0VeonNF+Cac= 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; bh=RDC+S2pPClJt5MdFcAtW3zyRo5LPh1rQa69WeWQdF5c=; b=G53qE3IDBd5Zv7UvxChPAd5b+gb+fDlNVGmLHbBy5bmiLqYH6y7bNRu0FMfwYm3l4r o+Nfmatc8OUt0fEzjquMH9OOY9gdIhlCcH4hJtIPw2jD0wAIcshIiZ8mwegMiayatvgE vwMw8cxfIlGovvA0Rx/gS2r+vMR8bXXfhFSyqiZU8m9MqECMQNqMztoHWq5H+Kki4uw8 OOlZAORUM8H/C2v2TExv3rahkJ/VEAbTuXG6DAQFfZDbBjXX/uP/JtMEsq/xR6ZJ00K8 TwFbSiJtEUhwXvFXbGVaMdxwl+juutqhNI2DUzFaxTqqcL/K65TSWslRRd+FFLXzxKXU vRQw== X-Gm-Message-State: AGi0PuYSWnllvv+CDVFRqRVXM6NU97Lr/mAPkGJ7ChsPUu9JW294GkZ6 lReojFylLFcF/XTiRL8jozhn+w== X-Google-Smtp-Source: APiQypKODK7Rnfvhluj346tTsrOphamuwmSNQRNFcvqcLk6DPHZ9mdef/ckCVkCDmkkCgjhNR7sc7A== 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200410_112716_087321_2D5D3765 X-CRM114-Status: GOOD ( 12.31 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , sunil@amarulasolutions.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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"