summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorThomas Skibo <thomas-git@skibo.net>2021-11-25 01:32:10 +0300
committerLeo Yu-Chi Liang <ycliang@andestech.com>2021-12-02 11:43:56 +0300
commitc0ffc12a701621dc72dfc896965cbfe5b0dbf9b4 (patch)
treeb4b8a02fe35bce92287cd280456611df10b43d27 /arch
parent6a863894ad53b2d0e6c6d47ad105850053757fec (diff)
downloadu-boot-c0ffc12a701621dc72dfc896965cbfe5b0dbf9b4.tar.xz
riscv: Enable SPI flash env for SiFive Unmatched.
Enable saving environment to SPI flash memory on SiFive Unmatched. Signed-off-by: Thomas Skibo <thomas-git@skibo.net> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/cpu/fu740/Kconfig13
1 files changed, 13 insertions, 0 deletions
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