From: Thomas Skibo <thomas-git@skibo.net>
To: u-boot@lists.denx.de
Cc: ycliang@andestech.com, Thomas Skibo <thomas-git@skibo.net>
Subject: [PATCH v3 2/2] riscv: Enable SPI flash env for SiFive Unmatched.
Date: Wed, 24 Nov 2021 14:32:10 -0800 [thread overview]
Message-ID: <20211124223210.5281-3-thomas-git@skibo.net> (raw)
In-Reply-To: <20211124223210.5281-1-thomas-git@skibo.net>
Enable saving environment to SPI flash memory on SiFive
Unmatched.
Signed-off-by: Thomas Skibo <thomas-git@skibo.net>
---
arch/riscv/cpu/fu740/Kconfig | 13 +++++++++++++
board/sifive/unmatched/Kconfig | 1 +
2 files changed, 14 insertions(+)
diff --git a/arch/riscv/cpu/fu740/Kconfig b/arch/riscv/cpu/fu740/Kconfig
index 049a0a0584..3e0c1fddc8 100644
--- a/arch/riscv/cpu/fu740/Kconfig
+++ b/arch/riscv/cpu/fu740/Kconfig
@@ -40,3 +40,16 @@ config SIFIVE_FU740
imply DM_I2C
imply SYS_I2C_OCORES
imply SPL_I2C
+
+if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET
+ default 0x505000
+
+config ENV_SIZE
+ default 0x20000
+
+config ENV_SECT_SIZE
+ default 0x10000
+
+endif # ENV_IS_IN_SPI_FLASH
diff --git a/board/sifive/unmatched/Kconfig b/board/sifive/unmatched/Kconfig
index fb2c1fbb58..fe213fd504 100644
--- a/board/sifive/unmatched/Kconfig
+++ b/board/sifive/unmatched/Kconfig
@@ -26,6 +26,7 @@ config SPL_OPENSBI_LOAD_ADDR
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select SIFIVE_FU740
+ select ENV_IS_IN_SPI_FLASH
select SUPPORT_SPL
select RESET_SIFIVE
select BINMAN
--
2.25.1
next prev parent reply other threads:[~2021-11-24 22:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 22:32 [PATCH v3 0/2] riscv: Support booting SiFive Unmatched from SPI flash Thomas Skibo
2021-11-24 22:32 ` [PATCH v3 1/2] riscv: Support booting SiFive Unmatched from SPI Thomas Skibo
2021-12-02 8:41 ` Leo Liang
2021-11-24 22:32 ` Thomas Skibo [this message]
2021-12-02 8:42 ` [PATCH v3 2/2] riscv: Enable SPI flash env for SiFive Unmatched Leo Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211124223210.5281-3-thomas-git@skibo.net \
--to=thomas-git@skibo.net \
--cc=u-boot@lists.denx.de \
--cc=ycliang@andestech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox