]> git.baikalelectronics.ru Git - uboot.git/commitdiff
riscv: Enable SPI flash env for SiFive Unmatched.
authorThomas Skibo <thomas-git@skibo.net>
Wed, 24 Nov 2021 22:32:10 +0000 (14:32 -0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 2 Dec 2021 08:43:56 +0000 (16:43 +0800)
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>
arch/riscv/cpu/fu740/Kconfig
board/sifive/unmatched/Kconfig

index 049a0a05841de2835b84797100a0a395f63061b8..3e0c1fddc889e69fb585362e1b2675e54a5cf7e9 100644 (file)
@@ -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
index fb2c1fbb58a299c999eb123f1c28a8a23f624299..fe213fd5047125ef69f049d3d4e1460a0615be9e 100644 (file)
@@ -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