[PATCH v6 08/12] arm: mvebu: clearfog: add SPI offsets
mrjoel at lixil.net
Mon Mar 23 21:21:36 CET 2020
Add reasonable default SPI offsets and ENV size when configured to
boot from SPI flash.
Signed-off-by: Joel Johnson <mrjoel at lixil.net>
Reviewed-by: Stefan Roese <sr at denx.de>
There was some reasonable concern raised about duplicating config
entries within a board specific config file rather than making
board specific configurations within defconfig. This seems to offer
a more board localized mechanism to provide platform defaults for
core values. As mentioned in the review, this usage seems to match
the Kconfig documented intended usage. As noted at
"Default values are not limited to the menu entry where
they are defined. This means the default can be defined
somewhere else or be overridden by an earlier definition."
Given that there is some dependency variability with these values I
prefer keeping them as Kconfig values, but defer to maintainers.
Notably, for the ENV values in this and a later commit, I'm using a
pattern already in used several other board configs.
board/solidrun/clearfog/Kconfig | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/board/solidrun/clearfog/Kconfig b/board/solidrun/clearfog/Kconfig
index 44224d903d..ea9c419472 100644
@@ -39,4 +39,16 @@ config CLEARFOG_SFP_25GB
SGMII connection (requires a supporting SFP). By default, transfer speed
of 1.25 Gbps is used, suitable for a more common 1 Gbps SFP module.
+ hex "Environment Sector-Size"
+ # Use SPI flash erase block size of 4 KiB
+ default 0x1000 if MVEBU_SPL_BOOT_DEVICE_SPI
+ # Use optimistic 64 KiB erase block, will vary between actual media
+ default 0x10000 if MVEBU_SPL_BOOT_DEVICE_MMC
+ hex "address of u-boot payload in SPI flash"
+ default 0x20000
+ depends on MVEBU_SPL_BOOT_DEVICE_SPI
More information about the U-Boot