[U-Boot] [PATCH v3] env: Added support to save env to spi through Kconfig
Maxime Ripard
maxime.ripard at bootlin.com
Wed Jul 18 12:28:01 UTC 2018
1;5202;0c
On Wed, Jul 18, 2018 at 09:11:35AM +0200, Michal Simek wrote:
> From: Vipul Kumar <vipul.kumar at xilinx.com>
>
> This patch added support to enable CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET
> and CONFIG_ENV_SECT_SIZE through Kconfig for Zynq and Zynqmp.
>
> Signed-off-by: Vipul Kumar <vipul.kumar at xilinx.com>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
> Changes in v3:
> - Fix also bitmain config which was failing
>
> Changes in v2:
> - Changed if condition of ENV_SIZE for Zynqmp
> - Changed if condition for ENV_SECT_SIZE
>
> configs/bitmain_antminer_s9_defconfig | 1 +
> env/Kconfig | 28 ++++++++++++++++++++++++++++
> include/configs/bitmain_antminer_s9.h | 3 ---
> include/configs/xilinx_zynqmp.h | 3 ---
> include/configs/zynq-common.h | 13 -------------
> 5 files changed, 29 insertions(+), 19 deletions(-)
>
> diff --git a/configs/bitmain_antminer_s9_defconfig b/configs/bitmain_antminer_s9_defconfig
> index 40bce4e37482..f59c767242f1 100644
> --- a/configs/bitmain_antminer_s9_defconfig
> +++ b/configs/bitmain_antminer_s9_defconfig
> @@ -4,6 +4,7 @@ CONFIG_SYS_BOARD="antminer_s9"
> CONFIG_SYS_CONFIG_NAME="bitmain_antminer_s9"
> CONFIG_ARCH_ZYNQ=y
> CONFIG_SYS_TEXT_BASE=0x4000000
> +CONFIG_ENV_OFFSET=0x300000
> CONFIG_SPL=y
> CONFIG_DEBUG_UART_BASE=0xe0001000
> CONFIG_DEBUG_UART_CLOCK=50000000
> diff --git a/env/Kconfig b/env/Kconfig
> index 8618376f252f..b37dcd78eb75 100644
> --- a/env/Kconfig
> +++ b/env/Kconfig
> @@ -480,6 +480,34 @@ config ENV_SIZE
>
> endif
>
> +if ARCH_ZYNQMP || ARCH_ZYNQ
> +
> +config ENV_OFFSET
> + hex "Environment Offset"
> + depends on !ENV_IS_NOWHERE
> + default 0x1E00000 if ARCH_ZYNQMP
> + default 0xE0000 if ARCH_ZYNQ
> + help
> + Offset from the start of the device (or partition)
> +
> +config ENV_SIZE
> + hex "Environment Size"
> + default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
> + default 0x8000 if ARCH_ZYNQMP
> + default 0x20000 if ARCH_ZYNQ
> + help
> + Size of the environment storage area.
These two are already defined in Kconfig, you can probably just add a
default <value> if ARCH_ZYNQ* there.
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180718/ffa6faee/attachment.sig>
More information about the U-Boot
mailing list