Message ID | 20200519192340.16624-7-jagan@amarulasolutions.com |
---|---|
State | Changes Requested |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=Pv1xQCbJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49RQrJ19hfz9sPK for <incoming@patchwork.ozlabs.org>; Wed, 20 May 2020 05:27:27 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F03081E41; Tue, 19 May 2020 21:24:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="Pv1xQCbJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2D96B81E26; Tue, 19 May 2020 21:24:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 37A4F81E2C for <u-boot@lists.denx.de>; Tue, 19 May 2020 21:24:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jagan@amarulasolutions.com Received: by mail-pl1-x641.google.com with SMTP id x10so296793plr.4 for <u-boot@lists.denx.de>; Tue, 19 May 2020 12:24:50 -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=QN1n4c5LMxVf1YaYQWpBH3NQf3Ufv/ksTgLkPGZFTCM=; b=Pv1xQCbJDZfla9BolEmehe9yvicPNyVRvyiHkiKWh8vkmYxXb2x45fKcAm090FLKes /dNMsEQjnaeltr9MhXDd4gDnQ39ggYRnLwM7Xpljfs8Rtl997VNVUHtJkYfcSJSuVmW6 xV2H2mGo4SmO56G3sTzo8O9xddw2ITrtOeIbs= 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=QN1n4c5LMxVf1YaYQWpBH3NQf3Ufv/ksTgLkPGZFTCM=; b=s7IAqfQQs2p96ZlBc1ASJeRngoqu/XgGN8ae/Y1osq5Og+xTl+iemCMNHnckQivY4S dIfy6zpktH8OgVIjVgRw9v19Tx1cHwPjTmafRfV+Pr59beXhqJlndXB7QVJVBN0RN9O4 3XwnbmKTJX9VN5M5XU+cPm1KT3z49kfid2ZF1+yfys10WEW1+Tn1Z+q84Rd/OQy6x69R Ua7tOAXcgWnEDYk/7MX6GQQ4OAso/Wqvg0IBzIJaLv5hKgfMmPhrx950zpMUkdUNaEFc VwigdNvknUeTIpBA+wccB7wLnnhuW29xndket5Qqtr0BMQo84Hyw3R84SLM/CCzn4dNz YuxA== X-Gm-Message-State: AOAM532PLpco5iY+7++NZfoaIH8dXgmPtmpgqVFNeVf6my9PBuRjE6J0 M/+GPiMjToBydz2dc7TO6ykRiw== X-Google-Smtp-Source: ABdhPJzAUGYOVNZL8bEpFvrAFti3Y1rzyGhaVsM99g6Y1rfcbVSRktg8eSszt1l8+87MsOF4zVfcng== X-Received: by 2002:a17:902:7b86:: with SMTP id w6mr968557pll.292.1589916288629; Tue, 19 May 2020 12:24:48 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:713c:4a0a:47eb:ffcd]) by smtp.gmail.com with ESMTPSA id w192sm222553pff.126.2020.05.19.12.24.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 12:24:47 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Rick Chen <rick@andestech.com>, Atish Patra <atish.patra@wdc.com>, Palmer Dabbelt <palmerdabbelt@google.com>, Bin Meng <bmeng.cn@gmail.com>, Paul Walmsley <paul.walmsley@sifive.com>, Anup Patel <anup.patel@wdc.com>, Sagar Kadam <sagar.kadam@sifive.com> Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v2 6/9] env: Enable SPI flash env for SiFive FU540 Date: Wed, 20 May 2020 00:53:37 +0530 Message-Id: <20200519192340.16624-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519192340.16624-1-jagan@amarulasolutions.com> References: <20200519192340.16624-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
riscv: sifive/fu540: Booting from SPI
|
expand
|
diff --git a/arch/riscv/cpu/fu540/Kconfig b/arch/riscv/cpu/fu540/Kconfig index 7a813a9ac8..417926d2cf 100644 --- a/arch/riscv/cpu/fu540/Kconfig +++ b/arch/riscv/cpu/fu540/Kconfig @@ -15,3 +15,16 @@ config SIFIVE_FU540 imply SPL_CPU_SUPPORT imply SPL_OPENSBI imply SPL_LOAD_FIT + +if CONFIG_ENV_IS_IN_SPI_FLASH + +config ENV_OFFSET + default 0x505000 + +config ENV_SIZE + default 0x20000 + +config ENV_SECT_SIZE + default 0x10000 + +endif # CONFIG_ENV_IS_IN_SPI_FLASH
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 Note: the loader1 must start from 40th sector even though there are 6 free sectors prior since 40th sector is nearest flash sector boundary. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- Changes for v2: - move env offsets from generic to cpu Kconfig arch/riscv/cpu/fu540/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+)