zynq: Move ENV location selection from zynq-common.h to config files.
PATCH 1/1 zynq: Move ENV location selection from zynq-common.h to config files.
The ifdef's in zynq-common.h do a partial selection of the u-boot environment storage location. As u-boot added more, the ifdefs no longe cope with all possible cases. Rather than correct the logic there, move the selection options into the board specific config files.
--- configs/zynq_microzed_defconfig | 1 + configs/zynq_picozed_defconfig | 1 + configs/zynq_zc702_defconfig | 1 + configs/zynq_zc706_defconfig | 1 + configs/zynq_zc770_xm010_defconfig | 2 +- configs/zynq_zc770_xm011_defconfig | 2 +- configs/zynq_zc770_xm012_defconfig | 2 +- configs/zynq_zc770_xm013_defconfig | 2 +- configs/zynq_zed_defconfig | 1 + configs/zynq_zybo_defconfig | 2 ++ include/configs/zynq-common.h | 10 ---------- 11 files changed, 11 insertions(+), 14 deletions(-)
configs/zynq_microzed_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_picozed_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_ZYNQ=y CONFIG_SYS_TEXT_BASE=0x4000000 CONFIG_DEFAULT_DEVICE_TREE="zynq-picozed" +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_NOWHERE" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zc702_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zc706_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zc770_xm010_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm010" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM010" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM010,ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zc770_xm011_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011,ENV_IS_NOWHERE" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zc770_xm012_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm012" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012,ENV_IS_IN_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zc770_xm013_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm013" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM013" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM013,ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zed_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zed" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zybo_defconfig +2 -0
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zybo" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
@@ -56,3 +57,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_G_DNL_MANUFACTURER="Xilinx" CONFIG_G_DNL_VENDOR_NUM=0x03fd CONFIG_G_DNL_PRODUCT_NUM=0x0300 +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH"
include/configs/zynq-common.h +0 -10
@@ -162,16 +162,6 @@/* Environment */ #ifndef CONFIG_ENV_IS_NOWHERE -# ifdef CONFIG_MTD_NOR_FLASH -/* Environment in NOR flash */ -# define CONFIG_ENV_IS_IN_FLASH -# elif defined(CONFIG_ZYNQ_QSPI ) -/* Environment in Serial Flash */ -# define CONFIG_ENV_IS_IN_SPI_FLASH -# elif !defined(CONFIG_MTD_NOR_FLASH ) -# define CONFIG_ENV_IS_NOWHERE -# endif -# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE# define CONFIG_ENV_OFFSET 0xE0000#endif
Signature · 1 line
2.7.4
PATCH 1/1 zynq: Move ENV location selection from zynq-common.h to config files.
Quoted 145 lines · Philip Balister
The ifdef's in
zynq-common.hdo a partial selection of the u-boot environment storage location. As u-boot added more, the ifdefs no longe cope with all possible cases. Rather than correct the logic there, move the selection options into the board specific config files.Signed-off-by Philip Balister <[email protected]>--- configs/zynq_microzed_defconfig | 1 + configs/zynq_picozed_defconfig | 1 + configs/zynq_zc702_defconfig | 1 + configs/zynq_zc706_defconfig | 1 + configs/zynq_zc770_xm010_defconfig | 2 +- configs/zynq_zc770_xm011_defconfig | 2 +- configs/zynq_zc770_xm012_defconfig | 2 +- configs/zynq_zc770_xm013_defconfig | 2 +- configs/zynq_zed_defconfig | 1 + configs/zynq_zybo_defconfig | 2 ++ include/configs/zynq-common.h | 10 ---------- 11 files changed, 11 insertions(+), 14 deletions(-)configs/zynq_microzed_defconfig +1
-0@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_picozed_defconfig +1
-0@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_ZYNQ=y CONFIG_SYS_TEXT_BASE=0x4000000 CONFIG_DEFAULT_DEVICE_TREE="zynq-picozed" +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_NOWHERE" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zc702_defconfig +1
-0@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zc706_defconfig +1
-0@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zc770_xm010_defconfig +1
-1@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm010" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM010" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM010,ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zc770_xm011_defconfig +1
-1@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011,ENV_IS_NOWHERE" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zc770_xm012_defconfig +1
-1@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm012" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012,ENV_IS_IN_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zc770_xm013_defconfig +1
-1@@ -5,7 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm013" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y -CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM013" +CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM013,ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zed_defconfig +1
-0@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zed" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=yconfigs/zynq_zybo_defconfig +1
-0@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zybo" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y
configs/zynq_zybo_defconfig CONFIG_USB_GADGET_DOWNLOAD=y · line 60
Quoted 4 lines
configs/zynq_zybo_defconfig +1
-0@@ -56,3 +57,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_G_DNL_MANUFACTURER="Xilinx" CONFIG_G_DNL_VENDOR_NUM=0x03fd CONFIG_G_DNL_PRODUCT_NUM=0x0300 +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH"
These are here twice.
Quoted 12 lines
include/configs/zynq-common.h +0
-3@@ -162,16 +162,6 @@/* Environment */ #ifndef CONFIG_ENV_IS_NOWHERE -# ifdef CONFIG_MTD_NOR_FLASH -/* Environment in NOR flash */ -# define CONFIG_ENV_IS_IN_FLASH
include/configs/zynq-common.h line 167
Quoted 10 lines
include/configs/zynq-common.h +0
-7-# elif defined(CONFIG_ZYNQ_QSPI ) -/* Environment in Serial Flash */ -# define CONFIG_ENV_IS_IN_SPI_FLASH -# elif !defined(CONFIG_MTD_NOR_FLASH ) -# define CONFIG_ENV_IS_NOWHERE -# endif -# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE# define CONFIG_ENV_OFFSET 0xE0000#endif
There is any problem with xm013 which shouldn't have any delta when this patch is applied.
02: zynq: Move ENV location selection from zynq-common.h to config files.
arm: (for 12/12 boards) all +231.0 bss +0.3 data +7.3 rodata
+21.0 text +202.3
zynq_zc770_xm013: all +2772 bss +4 data +88 rodata +252text +2428
u-boot: add: 21/0, grow: 5/0 bytes: 2232/0 (2232)
function old new
delta
spi_get_bus_and_cs - 356
+356
device_unbind - 328
+328
saveenv - 232
+232
env_import - 224
+224
env_relocate_spec 4 208
+204
env_export - 164
+164
spi_flash_probe_bus_cs - 140
+140
spi_find_chip_select - 84
+84
device_bind_driver_to_node - 72
+72
spi_flash_probe - 48
+48
do_env_save - 44
+44
device_find_next_child - 40
+40
device_bind - 40
+40
env_relocate 20 48
+28
env_help_text 563 591
+28
device_find_first_child - 28
+28
cmd_env_sub 252 280
+28
_u_boot_list_2_cmd_2_saveenv - 28
+28
spi_flash_write_dm - 24
+24
spi_flash_read_dm - 24
+24
spi_flash_erase_dm - 24
+24
device_bind_driver - 20
+20
spi_flash_free - 12
+12
env_name_spec - 4
+4
env_init 24 28
+4
env_flash - 4
+4
M
PATCH 1/1 zynq: Move ENV location selection from zynq-common.h to config files.
Quoted 21 lines · Michal Simek
Quoted 20 lines · Philip Balister
The ifdef's in
zynq-common.hdo a partial selection of the u-boot environment storage location. As u-boot added more, the ifdefs no longe cope with all possible cases. Rather than correct the logic there, move the selection options into the board specific config files.Signed-off-by Philip Balister <[email protected]>--- configs/zynq_microzed_defconfig | 1 + configs/zynq_picozed_defconfig | 1 + configs/zynq_zc702_defconfig | 1 + configs/zynq_zc706_defconfig | 1 + configs/zynq_zc770_xm010_defconfig | 2 +- configs/zynq_zc770_xm011_defconfig | 2 +- configs/zynq_zc770_xm012_defconfig | 2 +- configs/zynq_zc770_xm013_defconfig | 2 +- configs/zynq_zed_defconfig | 1 + configs/zynq_zybo_defconfig | 2 ++ include/configs/zynq-common.h | 10 ---------- 11 files changed, 11 insertions(+), 14 deletions(-)
Quoted 9 lines
configs/zynq_microzed_defconfig CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" · line 8
Quoted 9 lines
configs/zynq_microzed_defconfig +1
-0@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH"
No, we don't want to add more to SYS_EXTRA_OPTIONS, we want to start moving these options to Kconfig itself, directly. I'm happy to run the big migration of the configs so long as the Kconfig part has been tested in at least a few cases to be right. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170322/7682b349/attachment.sig>
PATCH 1/1 zynq: Move ENV location selection from zynq-common.h to config files.
Quoted 22 lines · Tom Rini
Quoted 21 lines · Michal Simek
Quoted 20 lines · Philip Balister
The ifdef's in
zynq-common.hdo a partial selection of the u-boot environment storage location. As u-boot added more, the ifdefs no longe cope with all possible cases. Rather than correct the logic there, move the selection options into the board specific config files.Signed-off-by Philip Balister <[email protected]>--- configs/zynq_microzed_defconfig | 1 + configs/zynq_picozed_defconfig | 1 + configs/zynq_zc702_defconfig | 1 + configs/zynq_zc706_defconfig | 1 + configs/zynq_zc770_xm010_defconfig | 2 +- configs/zynq_zc770_xm011_defconfig | 2 +- configs/zynq_zc770_xm012_defconfig | 2 +- configs/zynq_zc770_xm013_defconfig | 2 +- configs/zynq_zed_defconfig | 1 + configs/zynq_zybo_defconfig | 2 ++ include/configs/zynq-common.h | 10 ---------- 11 files changed, 11 insertions(+), 14 deletions(-)
Quoted 14 lines
Quoted 9 lines
configs/zynq_microzed_defconfig CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" · line 8
Quoted 9 lines
configs/zynq_microzed_defconfig +1
-0@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y +CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH"No, we don't want to add more to
SYS_EXTRA_OPTIONS, we want to start moving these options toKconfigitself, directly. I'm happy to run the big migration of the configs so long as theKconfigpart has been tested in at least a few cases to be right. Thanks!
ah right - it is even deprecated in Kconfig.
Thanks for reminder.
Michal