ARC: Move ENV_SIZE and ENV_OFFSET to Kconfig
PATCH 1/1 ARC: Move ENV_SIZE and ENV_OFFSET to Kconfig
Join the party of some ARM boards and drop more items from include/configs/xxx.h.
--- configs/emsdp_defconfig | 1 + configs/iot_devkit_defconfig | 1 + configs/tb100_defconfig | 1 + env/Kconfig | 4 +++- include/configs/axs10x.h | 1 - include/configs/emsdp.h | 1 - include/configs/hsdk.h | 2 -- include/configs/iot_devkit.h | 1 - include/configs/nsim.h | 6 ------ include/configs/tb100.h | 6 ------ 10 files changed, 6 insertions(+), 18 deletions(-)
configs/emsdp_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ISA_ARCV2=y CONFIG_CPU_ARCEM6=y CONFIG_TARGET_EMSDP=y CONFIG_SYS_TEXT_BASE=0x00000000 +CONFIG_ENV_SIZE=0x1000 CONFIG_SYS_CLK_FREQ=40000000 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_VERSION_VARIABLE=y
configs/iot_devkit_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_SYS_ICACHE_OFF=y CONFIG_SYS_DCACHE_OFF=y CONFIG_TARGET_IOT_DEVKIT=y CONFIG_SYS_TEXT_BASE=0x00000000 +CONFIG_ENV_SIZE=0x1000 CONFIG_SYS_CLK_FREQ=16000000 CONFIG_LOCALVERSION="-iotdk-1.0" # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
configs/tb100_defconfig +1 -0
@@ -1,6 +1,7 @@ CONFIG_ARC=y CONFIG_TARGET_TB100=y CONFIG_SYS_TEXT_BASE=0x84000000 +CONFIG_ENV_SIZE=0x800 CONFIG_SYS_CLK_FREQ=500000000 CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y
env/Kconfig +3 -1
@@ -431,7 +431,7 @@ config ENV_EXT4_FILE It's a string of the EXT4 file name. This file use to store the environment (explicit path to the file) -if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL +if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARC config ENV_OFFSET hex "Environment Offset"
@@ -441,6 +441,7 @@ config ENV_OFFSET default 0x88000 if ARCH_SUNXI default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP + default 0 help Offset from the start of the device (or partition)
@@ -449,6 +450,7 @@ config ENV_SIZE default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP default 0x20000 if ARCH_SUNXI || ARCH_ZYNQ default 0x8000 if ARCH_ROCKCHIP || ARCH_ZYNQMP || ARCH_VERSAL + default 0x4000 if ARC help Size of the environment storage area
include/configs/axs10x.h +0 -1
@@ -62,7 +62,6 @@/* * Environment settings */ -#define CONFIG_ENV_SIZE SZ_16K#define CONFIG_EXTRA_ENV_SETTINGS \ "upgrade=if mmc rescan && " \ "fatload mmc 0:1 ${loadaddr} u-boot-update.img && " \
include/configs/emsdp.h +0 -1
@@ -24,7 +24,6 @@/* * Environment */ -#define CONFIG_ENV_SIZE SZ_4K#define CONFIG_BOOTFILE "app.bin"#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR
include/configs/hsdk.h +0 -2
@@ -57,8 +57,6 @@/* * Environment settings */ -#define CONFIG_ENV_SIZE SZ_16K -#define CONFIG_EXTRA_ENV_SETTINGS \ "upgrade=if mmc rescan && " \ "fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \
include/configs/iot_devkit.h +0 -1
@@ -77,7 +77,6 @@/* * Environment */ -#define CONFIG_ENV_SIZE SZ_4K#define CONFIG_BOOTFILE "app.bin"#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR
include/configs/nsim.h +0 -6
@@ -24,12 +24,6 @@#define CONFIG_SYS_BOOTM_LEN SZ_32M#define CONFIG_SYS_LOAD_ADDR 0x82000000 -/* -* Environment settings -*/ -#define CONFIG_ENV_SIZE SZ_512 -#define CONFIG_ENV_OFFSET 0 -/* * Environment configuration */
include/configs/tb100.h +0 -6
@@ -52,12 +52,6 @@* Command line configuration */ -/* -* Environment settings -*/ -#define CONFIG_ENV_SIZE SZ_2K -#define CONFIG_ENV_OFFSET 0 -/* * Environment configuration */
Signature · 1 line
2.16.2
PATCH 1/1 ARC: Move ENV_SIZE and ENV_OFFSET to Kconfig
Quoted 70 lines · Alexey Brodkin
Join the party of some ARM boards and drop more items from
include/configs/xxx.h.Signed-off-by Alexey Brodkin <[email protected]>Cc Michal Simek <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>--- configs/emsdp_defconfig | 1 + configs/iot_devkit_defconfig | 1 + configs/tb100_defconfig | 1 + env/Kconfig | 4 +++- include/configs/axs10x.h | 1 - include/configs/emsdp.h | 1 - include/configs/hsdk.h | 2 -- include/configs/iot_devkit.h | 1 - include/configs/nsim.h | 6 ------ include/configs/tb100.h | 6 ------ 10 files changed, 6 insertions(+), 18 deletions(-)configs/emsdp_defconfig +1
-0@@ -3,6 +3,7 @@ CONFIG_ISA_ARCV2=y CONFIG_CPU_ARCEM6=y CONFIG_TARGET_EMSDP=y CONFIG_SYS_TEXT_BASE=0x00000000 +CONFIG_ENV_SIZE=0x1000 CONFIG_SYS_CLK_FREQ=40000000 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_VERSION_VARIABLE=yconfigs/iot_devkit_defconfig +1
-0@@ -5,6 +5,7 @@ CONFIG_SYS_ICACHE_OFF=y CONFIG_SYS_DCACHE_OFF=y CONFIG_TARGET_IOT_DEVKIT=y CONFIG_SYS_TEXT_BASE=0x00000000 +CONFIG_ENV_SIZE=0x1000 CONFIG_SYS_CLK_FREQ=16000000 CONFIG_LOCALVERSION="-iotdk-1.0" # CONFIG_ARCH_FIXUP_FDT_MEMORY is not setconfigs/tb100_defconfig +1
-0@@ -1,6 +1,7 @@ CONFIG_ARC=y CONFIG_TARGET_TB100=y CONFIG_SYS_TEXT_BASE=0x84000000 +CONFIG_ENV_SIZE=0x800 CONFIG_SYS_CLK_FREQ=500000000 CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=yenv/Kconfig +1
-1@@ -431,7 +431,7 @@ config ENV_EXT4_FILE It's a string of the EXT4 file name. This file use to store the environment (explicit path to the file) -if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL +if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARC config ENV_OFFSET hex "Environment Offset"
env/Kconfig config ENV_OFFSET · line 444
Quoted 4 lines
env/Kconfig +1
-0@@ -441,6 +441,7 @@ config ENV_OFFSET default 0x88000 if ARCH_SUNXI default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP + default 0
Please make this "if ARC", thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190116/0029f470/attachment.sig>
PATCH 1/1 ARC: Move ENV_SIZE and ENV_OFFSET to Kconfig
Hi Tom,
Quoted 18 lines
-----Original Message-----
From: Tom Rini <[email protected]>
Sent: Wednesday, January 16, 2019 7:19 PM
To: Alexey Brodkin <[email protected]>
Cc: u-boot at lists.denx.de; uboot-snps-arc at synopsys.com; Michal Simek <[email protected]>; Simon Glass <[email protected]>
Subject: Re: [PATCH] ARC: MoveENV_SIZEandENV_OFFSETtoKconfigQuoted 8 lines · Alexey Brodkin
Join the party of some ARM boards and drop more items from
include/configs/xxx.h.Signed-off-by Alexey Brodkin <[email protected]>Cc Michal Simek <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>---
[snip]
Quoted 9 lines
env/Kconfig config ENV_OFFSET · line 444
Quoted 7 lines
config
ENV_OFFSETenv/Kconfig +1
-0hex "Environment Offset"@@ -441,6 +441,7 @@ config ENV_OFFSET default 0x88000 if ARCH_SUNXI default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP + default 0Please make this "if ARC", thanks!
Actually I don't like having here listed all the boards because with more boards/arches moving ENV settings to Kconfig we'll get here all of them listed at some point.
Why default ENV_OFFSET [as well as] ENV_SIZE are not set in arch/soc/board top-level Kconfig?
-Alexey
PATCH 1/1 ARC: Move ENV_SIZE and ENV_OFFSET to Kconfig
Quoted 33 lines · Alexey Brodkin
Hi Tom,
Quoted 18 lines
-----Original Message-----
From: Tom Rini <[email protected]>
Sent: Wednesday, January 16, 2019 7:19 PM
To: Alexey Brodkin <[email protected]>
Cc: u-boot at lists.denx.de; uboot-snps-arc at synopsys.com; Michal Simek <[email protected]>; Simon Glass <[email protected]>
Subject: Re: [PATCH] ARC: MoveENV_SIZEandENV_OFFSETtoKconfigQuoted 8 lines · Alexey Brodkin
Join the party of some ARM boards and drop more items from
include/configs/xxx.h.Signed-off-by Alexey Brodkin <[email protected]>Cc Michal Simek <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>---
[snip]
Quoted 9 lines
env/Kconfig config ENV_OFFSET · line 444
Quoted 7 lines
config
ENV_OFFSETenv/Kconfig +1
-0hex "Environment Offset"@@ -441,6 +441,7 @@ config ENV_OFFSET default 0x88000 if ARCH_SUNXI default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP + default 0Please make this "if ARC", thanks!
Quoted 5 lines
Actually I don't like having here listed all the boards because with more boards/arches moving ENV settings to
Kconfigwe'll get here all of them listed at some point.
Why defaultENV_OFFSET[as well as]ENV_SIZEare not set inarch/soc/boardtop-levelKconfig?
I believe the answer is that having config FOO prompt in one place and N config FOO values results in lots of churn in the defconfig files when they get re-synced. So yes, having N lines of default X if Y with the prompt is what we want, at least until everything is converted and then we can see if no, really, moving the defaults to some defined / consistent locations doesn't result in so much churn.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190116/807cae62/attachment.sig>
PATCH 1/1 ARC: Move ENV_SIZE and ENV_OFFSET to Kconfig
Hi Tom,
Quoted 49 lines
-----Original Message-----
From: Tom Rini <[email protected]>
Sent: Wednesday, January 16, 2019 7:25 PM
To: Alexey Brodkin <[email protected]>
Cc: u-boot at lists.denx.de; uboot-snps-arc at synopsys.com; Michal Simek <[email protected]>; Simon Glass <[email protected]>
Subject: Re: [PATCH] ARC: MoveENV_SIZEandENV_OFFSETtoKconfigQuoted 7 lines · Alexey Brodkin
Hi Tom,
Quoted 5 lines
-----Original Message-----
From: Tom Rini <[email protected]>
Sent: Wednesday, January 16, 2019 7:19 PM
To: Alexey Brodkin <[email protected]>
Cc: u-boot at lists.denx.de; uboot-snps-arc at synopsys.com; Michal Simek <[email protected]>;Simon
Quoted 26 lines
Quoted 13 lines
Glass <[email protected]>
Subject: Re: [PATCH] ARC: MoveENV_SIZEandENV_OFFSETtoKconfigQuoted 8 lines · Alexey Brodkin
Join the party of some ARM boards and drop more items from
include/configs/xxx.h.Signed-off-by Alexey Brodkin <[email protected]>Cc Michal Simek <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>---
[snip]
Quoted 9 lines
env/Kconfig config ENV_OFFSET · line 444
Quoted 7 lines
config
ENV_OFFSETenv/Kconfig +1
-0hex "Environment Offset"@@ -441,6 +441,7 @@ config ENV_OFFSET default 0x88000 if ARCH_SUNXI default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP + default 0Please make this "if ARC", thanks!
Quoted 5 lines
Actually I don't like having here listed all the boards because with more boards/arches moving ENV settings to
Kconfigwe'll get here all of them listed at some point.
Why defaultENV_OFFSET[as well as]ENV_SIZEare not set inarch/soc/boardtop-levelKconfig?
Quoted 6 lines
I believe the answer is that having config FOO prompt in one place and N config FOO values results in lots of churn in the defconfig files when they get re-synced. So yes, having N lines of default X if Y with the prompt is what we want, at least until everything is converted and then we can see if no, really, moving the defaults to some defined / consistent locations doesn't result in so much churn.
Ok that's fine by me.
Sending a re-spin.
-Alexey