All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 21/44] Convert CONFIG_SPL_GPIO_SUPPORT to Kconfig
Date: Mon, 5 Sep 2016 19:04:45 -0600	[thread overview]
Message-ID: <CAPnjgZ0-aV7UgEpv0nmzfcM6yeT=939J1W+G+7wPFdad=hgfYg@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNATrd4TJgTTQAgx3qXZqDiAyDp5awH8pJECtREHAjKVDRA@mail.gmail.com>

Hi Masahiro,

On 4 September 2016 at 20:40, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2016-09-02 23:35 GMT+09:00 Tom Rini <trini@konsulko.com>:
>
>>> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>>> >> index c25fcf3..d4a5bc9 100644
>>> >> --- a/arch/arm/mach-exynos/Kconfig
>>> >> +++ b/arch/arm/mach-exynos/Kconfig
>>> >> @@ -61,6 +61,9 @@ endif
>>> >>
>>> >>  if ARCH_EXYNOS5
>>> >>
>>> >> +config SPL_GPIO_SUPPORT
>>> >> +       default y
>>> >> +
>>> >
>>> >
>>> > As we discussed before,
>>> > we decided to not do this.
>>>
>>> Tom was keen to avoid changing every defconfig file. It is there
>>> another way to express common defaults?
>>
>> I was thinking in the Kconfig with the entry for SPL_GPIO_SUPPORT, for
>> optional stuff and select in the board, etc, Kconfig for non-optional
>> stuff.  Now, I realize that optional vs non-optional is more the domain
>> of the individual SoC custodians, so we'll have some clean up afterwards
>> that isn't on you (well, aside from the SoCs you know like rockchip ;)).
>
> config SPL_GPIO_SUPPORT
>        default y
>
> is incorrect because it could violate
> the dependency in the proper Kconfig entry in spl/Kconfig.

But only if options depended on by this are not set, right?

>
>
>
>
> Basically, we are supposed to use "select FOO" when it is mandatory,
> or add CONFIG_FOO=y in a defconfig when the board wants it, but
> can still make it optional.

Yes, but this is not mandatory. It is a default, and some boards will
unset it. I did this in response to Tom's comment about trying to cut
down the defconfig patch size.

>
>
> I know our pain comes from that "include" is not supported by Kconfig.

How would that help? Why don't we implement it?

>
> What I can suggest now is:
>
>
>
> [1]  Add ARCH_WANT_* to specify a SoC-common default.
>
>
>        config SPL_GPIO_SUPPORT
>                 bool "GPIO support for SPL"
>                 default  ARCH_WANT_SPL_GPIO_SUPPORT
>
>
>        config ARCH_WANT_SPL_GPIO_SUPPORT
>                 bool
>
>
>        config ARCH_EXYNOS5
>                select ARCH_WANT_SPL_GPIO_SUPPORT
>
>
> Linux used to have ARCH_WANT_OPTIONAL_GPIOLIB to do similar things.
> (they stopped this way, though)
>
>
>
> [2] Support multi boards with one defconfig
>     (barebox supports multi-platform like Linux does.)
>
>
> [3] use pre-processor to support #include <...>
>
>
>
>
>
> BTW, SPL_GPIO_SUPPORT is optional in this case?
>
> U-Boot proper supports a command line interface,
> while SPL is usually run in a non-interactive mode.
>
> So, what SPL needs is generally mandatory,
> so we can "select" it,  I guess.

I found a lot of cases where 90% of the boards with the same SoC  had
the same setting for this (and a few other) options, but some boards
did not. So I did not want to use select, since then it is impossible
to unselect.

This series is actually really tricky. I'm looking forward to putting
it to bed. We need to make these conversions easier.

Regards,
Simon

  reply	other threads:[~2016-09-06  1:04 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30  0:21 [U-Boot] [PATCH v2 00/44] Kconfig: Move CONFIG_SPL_..._SUPPORT to Kconfig Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 01/44] Correct defconfigs using savedefconfig Simon Glass
2016-09-05  2:47   ` Masahiro Yamada
2016-09-06 18:01     ` Tom Rini
2016-09-06 18:08       ` Simon Glass
2016-09-07  4:03       ` Masahiro Yamada
2016-09-07 13:05         ` Tom Rini
2016-09-08  9:24           ` Masahiro Yamada
2016-08-30  0:21 ` [U-Boot] [PATCH v2 02/44] moveconfig: Add an option to skip prompts Simon Glass
2016-08-30  3:41   ` Masahiro Yamada
2016-08-30  0:21 ` [U-Boot] [PATCH v2 03/44] moveconfig: Add an option to commit changes Simon Glass
2016-08-30  4:00   ` Masahiro Yamada
2016-08-30  0:21 ` [U-Boot] [PATCH v2 04/44] Kconfig: Move SPL settings into their own file Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 05/44] arm: fsl: Adjust ordering of #ifndef CONFIG_SPL_BUILD Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 06/44] Drop CONFIG_SPL_RAM_SUPPORT Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 07/44] Use separate options for TPL support Simon Glass
2016-09-06 18:06   ` Tom Rini
2016-09-06 18:12     ` Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 08/44] Kconfig: spl: Add SPL support options to Kconfig Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 09/44] Kconfig: tpl: Add some TPL " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 10/44] Move existing use of CONFIG_SPL_DM " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 11/44] Move existing use of CONFIG_SPL_RSA " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 12/44] spear: Use upper case for CONFIG options Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 13/44] Convert CONFIG_SPL_CRYPTO_SUPPORT to Kconfig Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 14/44] Convert CONFIG_SPL_HASH_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 15/44] Convert CONFIG_SPL_DMA_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 16/44] Convert CONFIG_SPL_DRIVERS_MISC_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 17/44] Convert CONFIG_SPL_ENV_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 18/44] Convert CONFIG_SPL_ETH_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 19/44] Convert CONFIG_SPL_EXT_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 20/44] Convert CONFIG_SPL_FAT_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 21/44] Convert CONFIG_SPL_GPIO_SUPPORT " Simon Glass
2016-08-30  3:25   ` Masahiro Yamada
2016-08-30 18:33     ` Simon Glass
2016-09-02 14:35       ` Tom Rini
2016-09-05  2:40         ` Masahiro Yamada
2016-09-06  1:04           ` Simon Glass [this message]
2016-09-06 15:54             ` Tom Rini
2016-09-07  4:55               ` Masahiro Yamada
2016-09-12  4:16               ` Simon Glass
2016-09-12  4:32                 ` Masahiro Yamada
2016-09-12 14:19                   ` Tom Rini
2016-08-30  0:21 ` [U-Boot] [PATCH v2 22/44] Convert CONFIG_SPL_I2C_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 23/44] Convert CONFIG_SPL_LIBCOMMON_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 24/44] Convert CONFIG_SPL_LIBDISK_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 25/44] Convert CONFIG_SPL_LIBGENERIC_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 26/44] Convert CONFIG_SPL_MMC_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 27/44] Convert CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 28/44] Convert CONFIG_SPL_MTD_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 29/44] Convert CONFIG_SPL_MUSB_NEW_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 30/44] Convert CONFIG_SPL_NAND_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 31/44] Convert CONFIG_SPL_NET_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 32/44] Convert CONFIG_SPL_NOR_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 33/44] Convert CONFIG_SPL_ONENAND_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 34/44] Convert CONFIG_SPL_PINCTRL_SUPPORT " Simon Glass
2016-08-30  3:31   ` Masahiro Yamada
2016-08-30  0:21 ` [U-Boot] [PATCH v2 35/44] Convert CONFIG_SPL_POWER_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 36/44] Convert CONFIG_SPL_SATA_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 37/44] Convert CONFIG_SPL_SERIAL_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 38/44] Convert CONFIG_SPL_SPI_FLASH_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 39/44] Convert CONFIG_SPL_SPI_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 40/44] Convert CONFIG_SPL_USBETH_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 41/44] Convert CONFIG_SPL_USB_HOST_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 42/44] Convert CONFIG_SPL_USB_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 43/44] Convert CONFIG_SPL_WATCHDOG_SUPPORT " Simon Glass
2016-08-30  0:21 ` [U-Boot] [PATCH v2 44/44] Convert CONFIG_SPL_YMODEM_SUPPORT " Simon Glass
2016-08-30  5:28 ` [U-Boot] [PATCH v2 00/44] Kconfig: Move CONFIG_SPL_..._SUPPORT " Heiko Schocher
2016-09-06  1:04   ` Simon Glass

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='CAPnjgZ0-aV7UgEpv0nmzfcM6yeT=939J1W+G+7wPFdad=hgfYg@mail.gmail.com' \
    --to=sjg@chromium.org \
    --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.