From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 05/30] Convert CONFIG_ENV_IS_IN_FLASH to Kconfig
Date: Tue, 18 Jul 2017 12:55:04 -0400 [thread overview]
Message-ID: <20170718165504.GN14320@bill-the-cat> (raw)
In-Reply-To: <CACUy__UVx0_rYfrc32pqvnAH8EmJ3ujZ9AfWaOKe2kE_5mRZcw@mail.gmail.com>
On Tue, Jul 18, 2017 at 05:01:39PM +0200, Daniel Schwierzeck wrote:
> 2017-07-18 16:00 GMT+02:00 Simon Glass <sjg@chromium.org>:
> > Hi Daniel,
> >
> > On 10 July 2017 at 15:09, Daniel Schwierzeck
> > <daniel.schwierzeck@gmail.com> wrote:
> >>
> >>
> >> Am 09.07.2017 um 22:52 schrieb Simon Glass:
> >>> This converts the following to Kconfig:
> >>> CONFIG_ENV_IS_IN_FLASH
> >>>
> >>> Signed-off-by: Simon Glass <sjg@chromium.org>
> >>> ---
> >>>
> >>
> >> ...
> >>
> >>> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> >>> index 579371e8ee..3046d90b4d 100644
> >>> --- a/arch/mips/Kconfig
> >>> +++ b/arch/mips/Kconfig
> >>> @@ -21,6 +21,7 @@ config TARGET_QEMU_MIPS
> >>> select SUPPORTS_CPU_MIPS64_R1
> >>> select SUPPORTS_CPU_MIPS64_R2
> >>> select ROM_EXCEPTION_VECTORS
> >>> + imply ENV_IS_IN_FLASH
> >>>
> >>> config TARGET_MALTA
> >>> bool "Support malta"
> >>> @@ -42,6 +43,7 @@ config TARGET_MALTA
> >>> select SWAP_IO_SPACE
> >>> select MIPS_L1_CACHE_SHIFT_6
> >>> select ROM_EXCEPTION_VECTORS
> >>> + imply ENV_IS_IN_FLASH
> >>>
> >>> config TARGET_VCT
> >>> bool "Support vct"
> >>> @@ -108,6 +110,7 @@ config TARGET_BOSTON
> >>> select SUPPORTS_CPU_MIPS64_R2
> >>> select SUPPORTS_CPU_MIPS64_R6
> >>> select ROM_EXCEPTION_VECTORS
> >>> + imply ENV_IS_IN_FLASH
> >>>
> >>> config TARGET_XILFPGA
> >>> bool "Support Imagination Xilfpga"
> >>> @@ -197,6 +200,7 @@ config CPU_MIPS64_R2
> >>> bool "MIPS64 Release 2"
> >>> depends on SUPPORTS_CPU_MIPS64_R2
> >>> select 64BIT
> >>> + imply ENV_IS_IN_FLASH
> >>> help
> >>> Choose this option to build a kernel for release 2 through 5 of the
> >>> MIPS64 architecture.
> >>> @@ -297,6 +301,7 @@ config CPU_MIPS32
> >>> config CPU_MIPS64
> >>> bool
> >>> default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 || CPU_MIPS64_R6
> >>> + imply ENV_IS_IN_FLASH
> >>
> >> this is wrong as CONFIG_CPU_MIPS64 is a generic MIPS symbol and not a
> >> specific for a machine or board
> >
> > Well the intent is to reduce the number of changes to individual
> > boards / defconfig files. So in fact I want to use this more generic
> > option.
>
> yes, but adding "imply ENV_IS_IN_FLASH" to the Kconfig symbols
> CPU_MIPS64 and MIPS_CM is wrong due to the logical intent of these
> symbols. If you want to add the imply for all MIPS boards, then the
> correct place would be the MIPS symbol in arch/Kconfig. But enabling
> ENV_IS_IN_FLASH for all MIPS boards would be wrong too. Thus the
> "imply ENV_IS_IN_FLASH" only makes sense with the TARGET_* symbols
> because these describe default board configs.
>
> >
> >>
> >>>
> >>> config MIPS_TUNE_4KC
> >>> bool
> >>> @@ -401,6 +406,7 @@ config DYNAMIC_IO_PORT_BASE
> >>>
> >>> config MIPS_CM
> >>> bool
> >>> + imply ENV_IS_IN_FLASH
> >>
> >> dito for CONFIG_MIPS_CM
> >>
> >>> help
> >>> Select this if your system contains a MIPS Coherence Manager and you
> >>> wish U-Boot to configure it or make use of it to retrieve system
> >>
> >> ...
> >>
> >>> diff --git a/configs/vct_platinum_defconfig b/configs/vct_platinum_defconfig
> >>> index f8b9d7e61b..0e4fcbaa26 100644
> >>> --- a/configs/vct_platinum_defconfig
> >>> +++ b/configs/vct_platinum_defconfig
> >>> @@ -12,6 +12,7 @@ CONFIG_CMD_DHCP=y
> >>> CONFIG_CMD_PING=y
> >>> CONFIG_CMD_SNTP=y
> >>> CONFIG_CMD_FAT=y
> >>> +CONFIG_ENV_IS_IN_FLASH=y
> >>
> >> for consistency with the other MIPS boards in this patch, this should be
> >> added as "imply CONFIG_ENV_IS_IN_FLASH" in arch/mips/Kconfig under
> >> "config TARGET_VCT"
> >
> > If there are only 1-2 boards affected then I think it makes more sense
> > to put the change in the defconfig file. Adjusting Kconfig for
> > individual boards just seems odd...?
> >
>
> but you already touched all TARGET_* symbols in arch/mips/Kconfig
> except TARGET_VCT. Instead you patched all defconfig files for the 12
> VCT related boards which is contrary to the intention of your patch.
>
> So please only update the TARGET_* options either in arch/mips/Kconfig
> or arch/mips/mach-*/Kconfig, thanks.
To echo this, the moveconfig.py imply logic is good, but we then need to
see if it follows the human logic side. ie environment is a board
choice, not SoC/etc, so we need to shuffle it around to the right area.
Thanks!
--
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/20170718/97290ff2/attachment.sig>
next prev parent reply other threads:[~2017-07-18 16:55 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 20:52 [U-Boot] [PATCH 00/30] env: Move environment code to use location drivers Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 01/30] Makefile: Rename 'env' target to 'environ' Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 02/30] Move environment files from common/ to env/ Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 03/30] Convert CONFIG_ENV_IS_IN_MMC et al to Kconfig Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 04/30] env: Move help from README " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 05/30] Convert CONFIG_ENV_IS_IN_FLASH " Simon Glass
2017-07-10 22:09 ` Daniel Schwierzeck
2017-07-18 14:00 ` Simon Glass
2017-07-18 15:01 ` Daniel Schwierzeck
2017-07-18 16:55 ` Tom Rini [this message]
2017-07-09 20:52 ` [U-Boot] [PATCH 06/30] Convert CONFIG_ENV_IS_IN_NVRAM " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 07/30] Convert CONFIG_ENV_IS_IN_EEPROM " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 08/30] Convert CONFIG_ENV_IS_IN_DATAFLASH " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 09/30] Convert CONFIG_ENV_IS_IN_SPI_FLASH " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 10/30] Convert CONFIG_ENV_IS_IN_REMOTE " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 11/30] Convert CONFIG_ENV_IS_IN_FAT " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 12/30] env: common: Make env_get_addr/get_char_memory() static Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 13/30] env: common: Drop env_get_addr() Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 14/30] env: common: Factor out the common env_valid check Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 15/30] env: common: Drop env_get_char_init() Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 16/30] env: common: Drop env_get_char_memory() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 17/30] env: Add an enum for environment state Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 18/30] env: Rename nand env_location to nand_env_location Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 19/30] env: Create a location driver for each location Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 20/30] env: Add a new implementation of environment access Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 21/30] env: Switch over to use environment location drivers Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 22/30] env: Drop common init() functions Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 23/30] env: Drop the env_name_spec global Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 24/30] env: Drop unused env_ptr variables Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 25/30] env: Drop env_init_new() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 26/30] env: Drop env_get_char_spec() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 27/30] env: Drop env_relocate_spec() in favour of env_load() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 28/30] env: Drop saveenv() in favour of env_save() Simon Glass
2017-07-10 20:08 ` Wolfgang Denk
2017-07-12 0:32 ` Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 29/30] env: Adjust the get_char() method to return an int Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 30/30] env: Adjust the load() method to return an error Simon Glass
2017-07-10 8:10 ` [U-Boot] [PATCH 00/30] env: Move environment code to use location drivers Christophe LEROY
2017-07-10 16:38 ` Simon Glass
2017-07-11 7:59 ` Christophe LEROY
2017-07-12 0:32 ` Simon Glass
2017-07-12 12:24 ` Tom Rini
2017-07-13 16:45 ` Simon Glass
2017-07-18 0:56 ` Tom Rini
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=20170718165504.GN14320@bill-the-cat \
--to=trini@konsulko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox