diff mbox series

[v1] configs: starfive: Enable environment in SPI flash support

Message ID TY3P286MB261164F9A192B8CE7E7EBCDD980DA@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM
State Accepted
Commit 7d79bed00c9e02187a09e74e90c5bd5a927a6a61
Delegated to: Andes
Headers show
Series [v1] configs: starfive: Enable environment in SPI flash support | expand

Commit Message

Shengyu Qu Aug. 8, 2023, 1:14 p.m. UTC
On Starfive Visionfive 2, the u-boot environment settings are saved to
on-board SPI flash. Enable relative configs by default and set offset
and size according to upstream linux dts.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
---
 configs/starfive_visionfive2_defconfig | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Leo Liang Aug. 9, 2023, 7:01 a.m. UTC | #1
On Tue, Aug 08, 2023 at 09:14:36PM +0800, Shengyu Qu wrote:
> On Starfive Visionfive 2, the u-boot environment settings are saved to
> on-board SPI flash. Enable relative configs by default and set offset
> and size according to upstream linux dts.
> 
> Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
> ---
>  configs/starfive_visionfive2_defconfig | 9 +++++++++
>  1 file changed, 9 insertions(+)

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
diff mbox series

Patch

diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig
index 5d8a8e28cb..5e2e9b3489 100644
--- a/configs/starfive_visionfive2_defconfig
+++ b/configs/starfive_visionfive2_defconfig
@@ -6,6 +6,15 @@  CONFIG_NR_DRAM_BANKS=1
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80000000
 CONFIG_SF_DEFAULT_SPEED=100000000
+CONFIG_ENV_SUPPORT=y
+CONFIG_SAVEENV=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_NOWHERE=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_ENV_SECT_SIZE_AUTO=y
+CONFIG_ENV_SIZE=0x10000
+CONFIG_ENV_OFFSET=0xf0000
+CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_SPL_DM_SPI=y
 CONFIG_DEFAULT_DEVICE_TREE="jh7110-starfive-visionfive-2"
 CONFIG_SPL_TEXT_BASE=0x8000000