From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] zynq: Move ENV location selection from zynq-common.h to config files.
Date: Wed, 22 Mar 2017 15:30:09 +0100 [thread overview]
Message-ID: <669b3490-e192-75eb-1a68-1bb7a10885d5@xilinx.com> (raw)
In-Reply-To: <1490122569-15387-1-git-send-email-philip@opensdr.com>
On 21.3.2017 19:56, Philip Balister wrote:
> 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.
>
> Signed-off-by: Philip Balister <philip@opensdr.com>
> ---
> 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(-)
>
> diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
> index 4093618..b95c7d3 100644
> --- a/configs/zynq_microzed_defconfig
> +++ b/configs/zynq_microzed_defconfig
> @@ -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
> diff --git a/configs/zynq_picozed_defconfig b/configs/zynq_picozed_defconfig
> index 3c3a5b2..53e9a3e 100644
> --- a/configs/zynq_picozed_defconfig
> +++ b/configs/zynq_picozed_defconfig
> @@ -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
> diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
> index c59d7f5..62a96fd 100644
> --- a/configs/zynq_zc702_defconfig
> +++ b/configs/zynq_zc702_defconfig
> @@ -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
> diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
> index c73bacb..348f9fd 100644
> --- a/configs/zynq_zc706_defconfig
> +++ b/configs/zynq_zc706_defconfig
> @@ -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
> diff --git a/configs/zynq_zc770_xm010_defconfig b/configs/zynq_zc770_xm010_defconfig
> index ececcb4..3a8caba 100644
> --- a/configs/zynq_zc770_xm010_defconfig
> +++ b/configs/zynq_zc770_xm010_defconfig
> @@ -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
> diff --git a/configs/zynq_zc770_xm011_defconfig b/configs/zynq_zc770_xm011_defconfig
> index 980382c..7a6d2af 100644
> --- a/configs/zynq_zc770_xm011_defconfig
> +++ b/configs/zynq_zc770_xm011_defconfig
> @@ -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
> diff --git a/configs/zynq_zc770_xm012_defconfig b/configs/zynq_zc770_xm012_defconfig
> index 48caf31..8d23bd9 100644
> --- a/configs/zynq_zc770_xm012_defconfig
> +++ b/configs/zynq_zc770_xm012_defconfig
> @@ -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
> diff --git a/configs/zynq_zc770_xm013_defconfig b/configs/zynq_zc770_xm013_defconfig
> index 23bcb0e..3a0b9e6 100644
> --- a/configs/zynq_zc770_xm013_defconfig
> +++ b/configs/zynq_zc770_xm013_defconfig
> @@ -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
> diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
> index 26a5320..3f54495 100644
> --- a/configs/zynq_zed_defconfig
> +++ b/configs/zynq_zed_defconfig
> @@ -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
> diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
> index af7fe65..ed85319 100644
> --- a/configs/zynq_zybo_defconfig
> +++ b/configs/zynq_zybo_defconfig
> @@ -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"
These are here twice.
> diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
> index 431d6c4..94e49fb 100644
> --- a/include/configs/zynq-common.h
> +++ b/include/configs/zynq-common.h
> @@ -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
>
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 +252
text +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
next prev parent reply other threads:[~2017-03-22 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 18:56 [U-Boot] [PATCH] zynq: Move ENV location selection from zynq-common.h to config files Philip Balister
2017-03-22 14:30 ` Michal Simek [this message]
2017-03-22 14:49 ` Tom Rini
2017-03-22 15:07 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=669b3490-e192-75eb-1a68-1bb7a10885d5@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.