From patchwork Mon Apr 20 14:05:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1097 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 867213F086 for ; Mon, 20 Apr 2020 16:05:36 +0200 (CEST) Received: by mail-oo1-f71.google.com with SMTP id h26sf1345075oos.13 for ; Mon, 20 Apr 2020 07:05:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587391535; cv=pass; d=google.com; s=arc-20160816; b=ZCTw4BcrZbWL8PnpsOQuewsQXCvx2+LB/JRc4Z+Qh6KKf8FgE7QaoI4ANeTLVJSSqh btXbQmSl6gzI9nhmiuYRA4jmTitQ176EWR3iPi8TcCd1hZw7itjyJCJ3Z46MMwymNNwP adgo3LIzT7+OCgJdWJRZh+Epn6DRVz2gpIl7H7mG/34c3gAgbWwkESqoe69PsM9VnblI Tu7DovV9YAEgjz1z4GdfCKIyr7ytSKYNrAXaaesZFHBhonncmb3mMn1ksllfNrGj0GAs I1Z5CgTm5Wyv2rco8HgoV4mD4OAxF33JXskZOtvTYzlLxQ02YrIqqwHiFTLAUw64NQbB qK8w== 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=WNRyacXw6FmJ0Vt5RMWDhyxjhGC8F20IlRA6n+M+spc=; b=dTH7Ruy3jxtXfz3y7byR7PutWmvpq8GPE9zbgk8tniYodnLNlCuDKzsnWBCOFoHh79 Pz/aXi3Uku1/5MHEoQ0yXQ1kCdBfSwGC2HytNxy8n+pKLUpdqi79TNVd0Hy05R4LYNqH de3lM8ojJF75+1fcmhMKEtRvgvnke9JFkKb/XCuCSjY4v5F8QFx9iL4LYDxYkZqJxYj+ /nmhIZilS3L8k1bGpj8ywwBZNiBaA81FJKJqkTilf9Yy/hhQzdrMzKfcNEBB3iNWd1lC VjIOCuF3Pep5AnBt8HzAu3Ks1WVsP/9F0GPrplHcoTbmwacP0wOQ5YHqiZeJBCikXABQ XULw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TZWMWr4l; 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=WNRyacXw6FmJ0Vt5RMWDhyxjhGC8F20IlRA6n+M+spc=; b=hM4sZCxsEpQBufeagwn4MjqTAZpAd2a0lL3gDkEHf/JtNztlygELdhUzuqEJVPXE7M 7DBs/mkDjn5/k2QLpiOkxzT761CZQNzcqSSfdeXid34D+A7teVt4CPNTeDmmNTGS2nZF NOu3ZuoIILOZYJID1l6u25pPh+MNxE2Lepd4c= 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=WNRyacXw6FmJ0Vt5RMWDhyxjhGC8F20IlRA6n+M+spc=; b=WdAt8wiJ4ggoWJenjY83PvPUU8WB9dA2S33ePpoycTmmwJMR6ec0SpKrjzycALdCAK webpNh7tHOJxYOarl4aNdHrvg5bR+DUt5TgI2stELF68fxFi2NPefWktvGrTRrWwZbPN ME5M2Bob201g4j1V1QqALKUxg7twWOoiwT2JUTMIoMsSynjM3/uF6MoBcFF5nx6pNSAo /7A81viUmAjokir4fP6lHobq10s8okpMNtO0ZaqI6K6IbVX5gsDjiOQyRkArOg9KH6KA lhSiRlCXqzjJhVSrx5NkXKywvVBxPODcQQLvlgUoH723+rOw3ZS+PBN/3yEGSWHu38IS Tyhw== X-Gm-Message-State: AGi0PubHOjakqptPkKylxoPIBUxkgLbt8NWieKn1mocesz3qFZJIoOet nvU8m5yLemHcQd2OQdVf+vHkSfLN X-Google-Smtp-Source: APiQypI+vAu67KHETjMcpfwYJqrgJQ1W8TyUDq3IHc/U3beYZ5DzNWviRzQsfvsfZbK0ANTNd5yZVw== X-Received: by 2002:a05:6808:28b:: with SMTP id z11mr3208697oic.135.1587391534995; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aca:5212:: with SMTP id g18ls2352178oib.4.gmail; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) X-Received: by 2002:aca:cc0d:: with SMTP id c13mr10764800oig.125.1587391534600; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587391534; cv=none; d=google.com; s=arc-20160816; b=MRqE7OH9HdjuS77ikJ0/rDP+ufVugXB9C5x5QTqtQpw6CBkBk0dhd43WkavlOfLZAf K14Abe5GM01Wx5Ni2G4eiJziuzGUrtILN+xYfFbIkmixIx5zvfF0aOpHLjHGOzYZyN21 WNszWfTQBYXcBEH30P0r/wt2n7cOsbMNCrcA3r+l9tz/iYngVe64sEd2dFc1w2gugziM x8y1YLz8Axtl/L17APGjK4oxpJbaZTzqJSulR0rUhc3Lh4XXYNVcBEJGvwqkYVsAKa3F nNVgT8Rj6wcZvSKWWTPHUcuhtKm0O41KeXgFL5af8GObLxJ7udV5+4TpwnmeBaS2ymvl V5CQ== 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=E+FmdrOJFO38HAyf11+8nmtZS4UGGZB12Ul5vFvrF5M=; b=OtOiBMNi78gSQ5KYktVDi3TznKro7IhdE/Bk8Ai0qQvJmsktlvjslYcbGpwoQiPkaj TEDyfgR/cvu3MBHyAgYoDCeCkkSd8nmsMQPfeaQascCLneuyR1QiKOykBrXy1W7BibOv 5zndGKyeGH5+Ben6eqKDDf1SRBzZ26jn+jzYv0Do7/9T+a0WUAAWjYKkU9cOPY2QnskW wuyXvv2NZJDf77HpA0beLub/1Y5bUdiNsVi/CqhLlS7v7WgrcvArbGDBjBT8NqaZ7dsh QZCTmpSqiOgKDxRQnFAdn6zzAZI5hwxsBYwPPJ6Zt9SKpU33AD8Fbr1Ey0FtOlSDxPvT yJJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TZWMWr4l; 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 e13sor822042otk.144.2020.04.20.07.05.34 for (Google Transport Security); Mon, 20 Apr 2020 07:05:34 -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:a503:: with SMTP id s3mr17577039plq.303.1587391534217; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id z23sm1197219pfr.136.2020.04.20.07.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 07:05:33 -0700 (PDT) From: Jagan Teki To: pragnesh.patel@sifive.com, rick@andestech.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com, sagar.kadam@sifive.com, paul.walmsley@sifive.com, troy.benjegerdes@sifive.com, palmerdabbelt@google.com, anup.patel@wdc.com, atish.patra@wdc.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 2/5] env: Enable SPI flash env for SiFive FU540 Date: Mon, 20 Apr 2020 19:35:11 +0530 Message-Id: <20200420140514.25847-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420140514.25847-1-jagan@amarulasolutions.com> References: <20200420140514.25847-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=TZWMWr4l; 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: , SPI flash device on HiFive Unleashed has 32MiB Size. This patch add SPI flash environment after U-Boot proper partition with a size of 128KiB. SPI flash partition layout(32MiB): 0 - 34 : reserved for GPT header 35 - 39 : unused 40 - 2087 : loader1 (SPL, FSBL) 2088 - 10279 : loader2 (U-Boot proper, U-Boot) 10280 - 10535 : environment 10536 - 65494 : rootfs 65528 - 65536 : distro script Signed-off-by: Jagan Teki --- env/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 0d6f559b39..67c88fd40b 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -500,6 +500,7 @@ config ENV_OFFSET default 0 if ARC default 0x140000 if ARCH_AT91 default 0x260000 if ARCH_OMAP2PLUS + default 0x505000 if TARGET_SIFIVE_FU540 help Offset from the start of the device (or partition) @@ -519,6 +520,7 @@ config ENV_SIZE default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x4000 if ARC + default 0x20000 if TARGET_SIFIVE_FU540 default 0x1f000 help Size of the environment storage area @@ -529,6 +531,7 @@ config ENV_SECT_SIZE default 0x2000 if ARCH_ROCKCHIP default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91 + default 0x10000 if TARGET_SIFIVE_FU540 help Size of the sector containing the environment.