[PATCH v2 026/169] Correct SPL use of ARCH_VERSAL

This converts 1 usage of this option to the non-SPL form, since there is no SPL_ARCH_VERSAL defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/spi/cadence_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c index 328dfb0a388..3ce5f8fb8d8 100644 --- a/drivers/spi/cadence_qspi.c +++ b/drivers/spi/cadence_qspi.c @@ -249,7 +249,7 @@ static int cadence_spi_probe(struct udevice *bus)
priv->wr_delay = 50 * DIV_ROUND_UP(NSEC_PER_SEC, priv->ref_clk_hz);
- if (CONFIG_IS_ENABLED(ARCH_VERSAL)) { + if (IS_ENABLED(CONFIG_ARCH_VERSAL)) { /* Versal platform uses spi calibration to set read delay */ if (priv->read_delay >= 0) priv->read_delay = -1;

This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; }
-#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) /** * prepare_uefi_bootorder_entry() - generate the uefi bootmenu entries * @@ -343,7 +343,7 @@ static struct bootmenu_data *bootmenu_create(int delay) if (ret < 0) goto cleanup;
-#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) if (i < MAX_COUNT - 1) { efi_status_t efi_ret;

On 2/6/23 01:53, Simon Glass wrote:
This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; }
-#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
There is no reason whatsoever for using different macros for the two options.
/**
- prepare_uefi_bootorder_entry() - generate the uefi bootmenu entries
@@ -343,7 +343,7 @@ static struct bootmenu_data *bootmenu_create(int delay) if (ret < 0) goto cleanup;
-#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
ditto
Best regards
Heinrich
if (i < MAX_COUNT - 1) { efi_status_t efi_ret;

On Tue, Feb 07, 2023 at 12:54:03AM +0100, Heinrich Schuchardt wrote:
On 2/6/23 01:53, Simon Glass wrote:
This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; } -#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
There is no reason whatsoever for using different macros for the two options.
Here and elsewhere, one CONFIG is being fixed at a time. If at the end of the series this is not fixed, then that's an issue to address.

On 2/7/23 01:00, Tom Rini wrote:
On Tue, Feb 07, 2023 at 12:54:03AM +0100, Heinrich Schuchardt wrote:
On 2/6/23 01:53, Simon Glass wrote:
This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; } -#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
There is no reason whatsoever for using different macros for the two options.
Here and elsewhere, one CONFIG is being fixed at a time. If at the end of the series this is not fixed, then that's an issue to address.
This cannot be reviewed easily. I never received the complete series.
CONFIG_IS_ENABLED() is more restrictive than IS_ENABLED(). No motivation is provided why the condition should be relaxed in the commit message.
Cover-letters are not in the commit history. But anyway the cover-letter does not provide any motivation for the change either.
NAK to this patch.
Best regards
Heinrich

On Tue, Feb 07, 2023 at 08:39:38AM +0100, Heinrich Schuchardt wrote:
On 2/7/23 01:00, Tom Rini wrote:
On Tue, Feb 07, 2023 at 12:54:03AM +0100, Heinrich Schuchardt wrote:
On 2/6/23 01:53, Simon Glass wrote:
This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; } -#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
There is no reason whatsoever for using different macros for the two options.
Here and elsewhere, one CONFIG is being fixed at a time. If at the end of the series this is not fixed, then that's an issue to address.
This cannot be reviewed easily. I never received the complete series.
This, and the related series, are among the most reviewed we've had in quite some time. Just FWIW.
CONFIG_IS_ENABLED() is more restrictive than IS_ENABLED(). No motivation is provided why the condition should be relaxed in the commit message.
The idea of "restrictive" is not how either of those macros should be evaluated.
Cover-letters are not in the commit history. But anyway the cover-letter does not provide any motivation for the change either.
NAK to this patch.
It's incorrect to use CONFIG_IS_ENABLED() instead of IS_ENABLED() outside of: - CONFIG_FOO, CONFIG_SPL_FOO (etc) exist - The code in question is compiled in the SPL (etc) context and we do need to know if the code block in question is required here and the implicit value of SPL_FOO being false is useful. This case is why Simon insists that adding def_bool n for SPL_EFI_LOADER, etc, is correct, but I'm not convinced.
I will be taking most of these patches in the next day or two, but I can avoid the EFI ones if you insist. They are however I believe correct.

Hi Tom,
On Tue, 7 Feb 2023 at 07:50, Tom Rini trini@konsulko.com wrote:
On Tue, Feb 07, 2023 at 08:39:38AM +0100, Heinrich Schuchardt wrote:
On 2/7/23 01:00, Tom Rini wrote:
On Tue, Feb 07, 2023 at 12:54:03AM +0100, Heinrich Schuchardt wrote:
On 2/6/23 01:53, Simon Glass wrote:
This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; } -#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
There is no reason whatsoever for using different macros for the two options.
Here and elsewhere, one CONFIG is being fixed at a time. If at the end of the series this is not fixed, then that's an issue to address.
This cannot be reviewed easily. I never received the complete series.
This, and the related series, are among the most reviewed we've had in quite some time. Just FWIW.
CONFIG_IS_ENABLED() is more restrictive than IS_ENABLED(). No motivation is provided why the condition should be relaxed in the commit message.
The idea of "restrictive" is not how either of those macros should be evaluated.
Cover-letters are not in the commit history. But anyway the cover-letter does not provide any motivation for the change either.
NAK to this patch.
It's incorrect to use CONFIG_IS_ENABLED() instead of IS_ENABLED() outside of:
- CONFIG_FOO, CONFIG_SPL_FOO (etc) exist
- The code in question is compiled in the SPL (etc) context and we do need to know if the code block in question is required here and the implicit value of SPL_FOO being false is useful. This case is why Simon insists that adding def_bool n for SPL_EFI_LOADER, etc, is correct, but I'm not convinced.
The issue here is that we need a way to determine whether an option like CONFIG_FOO should apply to all build phases, or only U-Boot proper. The def_bool business creates an SPL symbol, so U-Boot then knows that the option applies only to U-Boot proper, with a separate one for CONFIG_SPL_FOO
There is a file call scripts/conf_nospl (in splc) which lists options that are exceptions. Otherwise we would need more of these def_bool things. The thing is, I don't really like the conf_nospl file, since it is configuring the operation of Kconfig but is not actually in the Kconfig description. So for things where I thought it was defensible, I added a def_bool.
I will be taking most of these patches in the next day or two, but I can avoid the EFI ones if you insist. They are however I believe correct.
-- Tom
Regards, Simon

On Tue, Feb 07, 2023 at 08:31:59AM -0700, Simon Glass wrote:
Hi Tom,
On Tue, 7 Feb 2023 at 07:50, Tom Rini trini@konsulko.com wrote:
On Tue, Feb 07, 2023 at 08:39:38AM +0100, Heinrich Schuchardt wrote:
On 2/7/23 01:00, Tom Rini wrote:
On Tue, Feb 07, 2023 at 12:54:03AM +0100, Heinrich Schuchardt wrote:
On 2/6/23 01:53, Simon Glass wrote:
This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; } -#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
There is no reason whatsoever for using different macros for the two options.
Here and elsewhere, one CONFIG is being fixed at a time. If at the end of the series this is not fixed, then that's an issue to address.
This cannot be reviewed easily. I never received the complete series.
This, and the related series, are among the most reviewed we've had in quite some time. Just FWIW.
CONFIG_IS_ENABLED() is more restrictive than IS_ENABLED(). No motivation is provided why the condition should be relaxed in the commit message.
The idea of "restrictive" is not how either of those macros should be evaluated.
Cover-letters are not in the commit history. But anyway the cover-letter does not provide any motivation for the change either.
NAK to this patch.
It's incorrect to use CONFIG_IS_ENABLED() instead of IS_ENABLED() outside of:
- CONFIG_FOO, CONFIG_SPL_FOO (etc) exist
- The code in question is compiled in the SPL (etc) context and we do need to know if the code block in question is required here and the implicit value of SPL_FOO being false is useful. This case is why Simon insists that adding def_bool n for SPL_EFI_LOADER, etc, is correct, but I'm not convinced.
The issue here is that we need a way to determine whether an option like CONFIG_FOO should apply to all build phases, or only U-Boot proper. The def_bool business creates an SPL symbol, so U-Boot then knows that the option applies only to U-Boot proper, with a separate one for CONFIG_SPL_FOO
Please bear in mind that today a lack of definition works, and is a feature, not a bug nor glitch. It's why, today, the tests in lib/vsprintf.c are correct.
There is a file call scripts/conf_nospl (in splc) which lists options that are exceptions. Otherwise we would need more of these def_bool things. The thing is, I don't really like the conf_nospl file, since it is configuring the operation of Kconfig but is not actually in the Kconfig description. So for things where I thought it was defensible, I added a def_bool.
Keep in mind that everything works as intended, today. What's being done in the EFI loader code works, but is a bad practice. It's what lead to the MMC_QUIRKS actual bug and time being lost debugging a problem that shouldn't have been.
What split config introduces / requires is for discussion over *there*.

On 2/7/23 15:50, Tom Rini wrote:
On Tue, Feb 07, 2023 at 08:39:38AM +0100, Heinrich Schuchardt wrote:
On 2/7/23 01:00, Tom Rini wrote:
On Tue, Feb 07, 2023 at 12:54:03AM +0100, Heinrich Schuchardt wrote:
On 2/6/23 01:53, Simon Glass wrote:
This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
boot/Makefile | 2 +- cmd/bootmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/Makefile b/boot/Makefile index 69c31adb77d..73b5b19816b 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o endif diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d799..422ab411252 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu, return 1; } -#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG)) +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
There is no reason whatsoever for using different macros for the two options.
Here and elsewhere, one CONFIG is being fixed at a time. If at the end of the series this is not fixed, then that's an issue to address.
This cannot be reviewed easily. I never received the complete series.
This, and the related series, are among the most reviewed we've had in quite some time. Just FWIW.
CONFIG_IS_ENABLED() is more restrictive than IS_ENABLED(). No motivation is provided why the condition should be relaxed in the commit message.
The idea of "restrictive" is not how either of those macros should be evaluated.
Cover-letters are not in the commit history. But anyway the cover-letter does not provide any motivation for the change either.
NAK to this patch.
It's incorrect to use CONFIG_IS_ENABLED() instead of IS_ENABLED() outside of:
- CONFIG_FOO, CONFIG_SPL_FOO (etc) exist
- The code in question is compiled in the SPL (etc) context and we do need to know if the code block in question is required here and the implicit value of SPL_FOO being false is useful. This case is why Simon insists that adding def_bool n for SPL_EFI_LOADER, etc, is correct, but I'm not convinced.
I will be taking most of these patches in the next day or two, but I can avoid the EFI ones if you insist. They are however I believe correct.
The code changes are ok with me. It were simply the commit messages which were insufficient.
Acked-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com

This converts 2 usages of this option to the non-SPL form, since there is no SPL_DISPLAY_AER_BRIEF defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/sysreset/sysreset_mpc83xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c index 81fccf95767..c9a03266595 100644 --- a/drivers/sysreset/sysreset_mpc83xx.c +++ b/drivers/sysreset/sysreset_mpc83xx.c @@ -120,7 +120,7 @@ static int print_83xx_arb_event(bool force, char *buf, int size) "Master ID", mstr_id, master[mstr_id], "Transfer Size", tsize_val, tsize_bytes, "Transfer Type", ttype, transfer[ttype]); - } else if (CONFIG_IS_ENABLED(DISPLAY_AER_BRIEF)) { + } else if (IS_ENABLED(CONFIG_DISPLAY_AER_BRIEF)) { res = snprintf(buf, size, "Arbiter Event Status: AEATR=0x%08lX, AEADR=0x%08lX\n", gd->arch.arbiter_event_attributes, @@ -185,7 +185,7 @@ static int mpc83xx_sysreset_get_status(struct udevice *dev, char *buf, int size) * arbiter driver */ if (CONFIG_IS_ENABLED(DISPLAY_AER_FULL) || - CONFIG_IS_ENABLED(DISPLAY_AER_BRIEF)) { + IS_ENABLED(CONFIG_DISPLAY_AER_BRIEF)) { /* * If there was a bus monitor reset event, we force the arbiter * event to be printed

This converts 1 usage of this option to the non-SPL form, since there is no SPL_EFI_MM_COMM_TEE defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
cmd/eficonfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 47c04cf5363..46f652c35d6 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -2670,7 +2670,7 @@ static const struct eficonfig_item maintenance_menu_items[] = { {"Edit Boot Option", eficonfig_process_edit_boot_option}, {"Change Boot Order", eficonfig_process_change_boot_order}, {"Delete Boot Option", eficonfig_process_delete_boot_option}, -#if (CONFIG_IS_ENABLED(EFI_SECURE_BOOT) && CONFIG_IS_ENABLED(EFI_MM_COMM_TEE)) +#if (CONFIG_IS_ENABLED(EFI_SECURE_BOOT) && IS_ENABLED(CONFIG_EFI_MM_COMM_TEE)) {"Secure Boot Configuration", eficonfig_process_secure_boot_config}, #endif {"Quit", eficonfig_process_quit},

On 2/6/23 01:54, Simon Glass wrote:
This converts 1 usage of this option to the non-SPL form, since there is no SPL_EFI_MM_COMM_TEE defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
cmd/eficonfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 47c04cf5363..46f652c35d6 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -2670,7 +2670,7 @@ static const struct eficonfig_item maintenance_menu_items[] = { {"Edit Boot Option", eficonfig_process_edit_boot_option}, {"Change Boot Order", eficonfig_process_change_boot_order}, {"Delete Boot Option", eficonfig_process_delete_boot_option}, -#if (CONFIG_IS_ENABLED(EFI_SECURE_BOOT) && CONFIG_IS_ENABLED(EFI_MM_COMM_TEE)) +#if (CONFIG_IS_ENABLED(EFI_SECURE_BOOT) && IS_ENABLED(CONFIG_EFI_MM_COMM_TEE))
There is no reason to use two different macros here.
Best regards
Heinrich
{"Secure Boot Configuration", eficonfig_process_secure_boot_config}, #endif {"Quit", eficonfig_process_quit},

This converts 3 usages of this option to the non-SPL form, since there is no SPL_FASTBOOT defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/arm/mach-rockchip/board.c | 2 +- board/ti/am57xx/board.c | 2 +- board/ti/dra7xx/evm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 6e05a8f76ef..ebffb6c3ff0 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -306,7 +306,7 @@ int board_usb_init(int index, enum usb_init_type init)
#endif /* CONFIG_USB_GADGET */
-#if CONFIG_IS_ENABLED(FASTBOOT) +#if IS_ENABLED(CONFIG_FASTBOOT) int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 0e57ee566b3..9ea507a8e96 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -1172,7 +1172,7 @@ int board_fit_config_name_match(const char *name) } #endif
-#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +#if IS_ENABLED(CONFIG_FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 568c8fb0411..a8a216d034a 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -1049,7 +1049,7 @@ int board_fit_config_name_match(const char *name) } #endif
-#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +#if IS_ENABLED(CONFIG_FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER)

This converts 5 usages of this option to the non-SPL form, since there is no SPL_FASTBOOT_FLASH_MMC defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Mattijs Korpershoek mkorpershoek@baylibre.com ---
(no changes since v1)
drivers/fastboot/fb_command.c | 4 ++-- drivers/fastboot/fb_common.c | 2 +- drivers/fastboot/fb_getvar.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 67a94798287..5a3fb69b3f7 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -295,7 +295,7 @@ void fastboot_data_complete(char *response) */ static void __maybe_unused flash(char *cmd_parameter, char *response) { - if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)) + if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC)) fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr, image_size, response);
@@ -315,7 +315,7 @@ static void __maybe_unused flash(char *cmd_parameter, char *response) */ static void __maybe_unused erase(char *cmd_parameter, char *response) { - if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)) + if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC)) fastboot_mmc_erase(cmd_parameter, response);
if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND)) diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index 7563650d07d..57b6182c46a 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -99,7 +99,7 @@ int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) const int mmc_dev = config_opt_enabled(CONFIG_FASTBOOT_FLASH_MMC, CONFIG_FASTBOOT_FLASH_MMC_DEV, -1);
- if (!CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)) + if (!IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC)) return -EINVAL;
if (reason >= FASTBOOT_REBOOT_REASONS_COUNT) diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c index bcef8f866f3..de4879dadfb 100644 --- a/drivers/fastboot/fb_getvar.c +++ b/drivers/fastboot/fb_getvar.c @@ -62,7 +62,7 @@ static const struct { .variable = "has-slot", .dispatch = getvar_has_slot #endif -#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC) +#if IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC) }, { .variable = "partition-type", .dispatch = getvar_partition_type @@ -99,7 +99,7 @@ static int getvar_get_part_info(const char *part_name, char *response, struct disk_partition disk_part; struct part_info *part_info;
- if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)) { + if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC)) { r = fastboot_mmc_get_part_info(part_name, &dev_desc, &disk_part, response); if (r >= 0 && size)

This converts 3 usages of this option to the non-SPL form, since there is no SPL_FASTBOOT_FLASH_NAND defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Mattijs Korpershoek mkorpershoek@baylibre.com ---
(no changes since v1)
drivers/fastboot/fb_command.c | 4 ++-- drivers/fastboot/fb_getvar.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 5a3fb69b3f7..71cfaec6e9d 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -299,7 +299,7 @@ static void __maybe_unused flash(char *cmd_parameter, char *response) fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr, image_size, response);
- if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND)) + if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND)) fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr, image_size, response); } @@ -318,7 +318,7 @@ static void __maybe_unused erase(char *cmd_parameter, char *response) if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC)) fastboot_mmc_erase(cmd_parameter, response);
- if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND)) + if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND)) fastboot_nand_erase(cmd_parameter, response); }
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c index de4879dadfb..dd3475e0a8b 100644 --- a/drivers/fastboot/fb_getvar.c +++ b/drivers/fastboot/fb_getvar.c @@ -104,7 +104,7 @@ static int getvar_get_part_info(const char *part_name, char *response, response); if (r >= 0 && size) *size = disk_part.size * disk_part.blksz; - } else if (CONFIG_IS_ENABLED(FASTBOOT_FLASH_NAND)) { + } else if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND)) { r = fastboot_nand_get_part_info(part_name, &part_info, response); if (r >= 0 && size) *size = part_info->size;

This converts 4 usages of this option to the non-SPL form, since there is no SPL_FEC_MXC defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/freescale/imx8mp_evk/imx8mp_evk.c | 2 +- board/freescale/imx93_evk/imx93_evk.c | 2 +- board/variscite/imx8mn_var_som/imx8mn_var_som.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/board/engicam/imx8mp/icore_mx8mp.c b/board/engicam/imx8mp/icore_mx8mp.c index f0096a2a879..500080c7cff 100644 --- a/board/engicam/imx8mp/icore_mx8mp.c +++ b/board/engicam/imx8mp/icore_mx8mp.c @@ -58,7 +58,7 @@ int board_phy_config(struct phy_device *phydev)
int board_init(void) { - if (CONFIG_IS_ENABLED(FEC_MXC)) + if (IS_ENABLED(CONFIG_FEC_MXC)) setup_fec();
if (IS_ENABLED(CONFIG_DWC_ETH_QOS)) diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c index c7692677f9a..ce211d486ab 100644 --- a/board/freescale/imx8mp_evk/imx8mp_evk.c +++ b/board/freescale/imx8mp_evk/imx8mp_evk.c @@ -55,7 +55,7 @@ int board_init(void) { int ret = 0;
- if (CONFIG_IS_ENABLED(FEC_MXC)) { + if (IS_ENABLED(CONFIG_FEC_MXC)) { setup_fec(); }
diff --git a/board/freescale/imx93_evk/imx93_evk.c b/board/freescale/imx93_evk/imx93_evk.c index e01b2f59e3f..e73a498733b 100644 --- a/board/freescale/imx93_evk/imx93_evk.c +++ b/board/freescale/imx93_evk/imx93_evk.c @@ -66,7 +66,7 @@ static int setup_eqos(void)
int board_init(void) { - if (CONFIG_IS_ENABLED(FEC_MXC)) + if (IS_ENABLED(CONFIG_FEC_MXC)) setup_fec();
if (IS_ENABLED(CONFIG_DWC_ETH_QOS)) diff --git a/board/variscite/imx8mn_var_som/imx8mn_var_som.c b/board/variscite/imx8mn_var_som/imx8mn_var_som.c index e274e0e0a4c..d40f4d01761 100644 --- a/board/variscite/imx8mn_var_som/imx8mn_var_som.c +++ b/board/variscite/imx8mn_var_som/imx8mn_var_som.c @@ -18,7 +18,7 @@ static void setup_fec(void)
int board_init(void) { - if (CONFIG_IS_ENABLED(FEC_MXC)) + if (IS_ENABLED(CONFIG_FEC_MXC)) setup_fec();
return 0;

This converts 3 usages of this option to the non-SPL form, since there is no SPL_OF_BOARD defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Matthias Brugger mbrugger@suse.com ---
(no changes since v1)
drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 2 +- drivers/serial/serial_bcm283x_mu.c | 2 +- drivers/serial/serial_bcm283x_pl011.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c index 44a310f83de..e949cb70900 100644 --- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c +++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c @@ -153,7 +153,7 @@ U_BOOT_DRIVER(pinctrl_bcm283x) = { .priv_auto = sizeof(struct bcm283x_pinctrl_priv), .ops = &bcm283x_pinctrl_ops, .probe = bcm283x_pinctl_probe, -#if CONFIG_IS_ENABLED(OF_BOARD) +#if IS_ENABLED(CONFIG_OF_BOARD) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c index 12cbcb9858c..7585f790d22 100644 --- a/drivers/serial/serial_bcm283x_mu.c +++ b/drivers/serial/serial_bcm283x_mu.c @@ -197,7 +197,7 @@ U_BOOT_DRIVER(serial_bcm283x_mu) = { .plat_auto = sizeof(struct bcm283x_mu_serial_plat), .probe = bcm283x_mu_serial_probe, .ops = &bcm283x_mu_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD) +#if !CONFIG_IS_ENABLED(OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD) .flags = DM_FLAG_PRE_RELOC, #endif .priv_auto = sizeof(struct bcm283x_mu_priv), diff --git a/drivers/serial/serial_bcm283x_pl011.c b/drivers/serial/serial_bcm283x_pl011.c index 7d172cdac0a..09a9868a38f 100644 --- a/drivers/serial/serial_bcm283x_pl011.c +++ b/drivers/serial/serial_bcm283x_pl011.c @@ -94,7 +94,7 @@ U_BOOT_DRIVER(bcm283x_pl011_uart) = { .probe = bcm283x_pl011_serial_probe, .plat_auto = sizeof(struct pl01x_serial_plat), .ops = &bcm283x_pl011_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD) +#if !CONFIG_IS_ENABLED(OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD) .flags = DM_FLAG_PRE_RELOC, #endif .priv_auto = sizeof(struct pl01x_priv),

This converts 1 usage of this option to the non-SPL form, since there is no SPL_PANEL defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/video/imx/mxc_ipuv3_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c index 8b01a1be112..7e60385bcfa 100644 --- a/drivers/video/imx/mxc_ipuv3_fb.c +++ b/drivers/video/imx/mxc_ipuv3_fb.c @@ -615,7 +615,7 @@ static int ipuv3_video_probe(struct udevice *dev) if (ret < 0) return ret; #endif - if (CONFIG_IS_ENABLED(PANEL)) { + if (IS_ENABLED(CONFIG_PANEL)) { struct udevice *panel_dev;
ret = uclass_get_device(UCLASS_PANEL, 0, &panel_dev);

This converts 1 usage of this option to the non-SPL form, since there is no SPL_PHY_CADENCE_SIERRA defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/phy/cadence/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/cadence/Makefile b/drivers/phy/cadence/Makefile index af63b32d9f5..c247feb8262 100644 --- a/drivers/phy/cadence/Makefile +++ b/drivers/phy/cadence/Makefile @@ -1,2 +1,2 @@ -obj-$(CONFIG_$(SPL_)PHY_CADENCE_SIERRA) += phy-cadence-sierra.o +obj-$(CONFIG_PHY_CADENCE_SIERRA) += phy-cadence-sierra.o obj-$(CONFIG_$(SPL_)PHY_CADENCE_TORRENT) += phy-cadence-torrent.o

This converts 1 usage of this option to the non-SPL form, since there is no SPL_PHY_CADENCE_TORRENT defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/phy/cadence/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/cadence/Makefile b/drivers/phy/cadence/Makefile index c247feb8262..a1cb6868c9e 100644 --- a/drivers/phy/cadence/Makefile +++ b/drivers/phy/cadence/Makefile @@ -1,2 +1,2 @@ obj-$(CONFIG_PHY_CADENCE_SIERRA) += phy-cadence-sierra.o -obj-$(CONFIG_$(SPL_)PHY_CADENCE_TORRENT) += phy-cadence-torrent.o +obj-$(CONFIG_PHY_CADENCE_TORRENT) += phy-cadence-torrent.o

This converts 2 usages of this option to the non-SPL form, since there is no SPL_PMIC_STPMIC1 defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c index 934800be93d..6f3641ccf57 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c @@ -1583,7 +1583,7 @@ int stm32prog_pmic_read(struct stm32prog_data *data, u32 offset, u8 *buffer, int result = 0, ret; struct udevice *dev;
- if (!CONFIG_IS_ENABLED(PMIC_STPMIC1)) { + if (!IS_ENABLED(CONFIG_PMIC_STPMIC1)) { stm32prog_err("PMIC update not supported");
return -EOPNOTSUPP; @@ -1633,7 +1633,7 @@ int stm32prog_pmic_start(struct stm32prog_data *data) int ret; struct udevice *dev;
- if (!CONFIG_IS_ENABLED(PMIC_STPMIC1)) { + if (!IS_ENABLED(CONFIG_PMIC_STPMIC1)) { stm32prog_err("PMIC update not supported");
return -EOPNOTSUPP;

This converts 2 usages of this option to the non-SPL form, since there is no SPL_ROCKCHIP_OTP defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/arm/mach-rockchip/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c index 437c7cf896a..b350f18f114 100644 --- a/arch/arm/mach-rockchip/misc.c +++ b/arch/arm/mach-rockchip/misc.c @@ -60,7 +60,7 @@ int rockchip_cpuid_from_efuse(const u32 cpuid_offset, const u32 cpuid_length, u8 *cpuid) { -#if IS_ENABLED(CONFIG_ROCKCHIP_EFUSE) || CONFIG_IS_ENABLED(ROCKCHIP_OTP) +#if IS_ENABLED(CONFIG_ROCKCHIP_EFUSE) || IS_ENABLED(CONFIG_ROCKCHIP_OTP) struct udevice *dev; int ret;
@@ -68,7 +68,7 @@ int rockchip_cpuid_from_efuse(const u32 cpuid_offset, #if IS_ENABLED(CONFIG_ROCKCHIP_EFUSE) ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(rockchip_efuse), &dev); -#elif CONFIG_IS_ENABLED(ROCKCHIP_OTP) +#elif IS_ENABLED(CONFIG_ROCKCHIP_OTP) ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(rockchip_otp), &dev); #endif

This converts 2 usages of this option to the non-SPL form, since there is no SPL_SAVE_PREV_BL_INITRAMFS_START_ADDR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/arm/lib/save_prev_bl_data.c | 2 +- common/board_r.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/lib/save_prev_bl_data.c b/arch/arm/lib/save_prev_bl_data.c index cd943eefe10..f7b23faf0d6 100644 --- a/arch/arm/lib/save_prev_bl_data.c +++ b/arch/arm/lib/save_prev_bl_data.c @@ -62,7 +62,7 @@ int save_prev_bl_data(void)
if (IS_ENABLED(CONFIG_SAVE_PREV_BL_FDT_ADDR)) env_set_addr("prevbl_fdt_addr", (void *)reg0); - if (!CONFIG_IS_ENABLED(SAVE_PREV_BL_INITRAMFS_START_ADDR)) + if (!IS_ENABLED(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR)) return 0;
node = fdt_path_offset(fdt_blob, "/chosen"); diff --git a/common/board_r.c b/common/board_r.c index 6026e4367ce..c6c0c1ab1d9 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -452,7 +452,7 @@ static int initr_env(void) env_set_hex("fdtcontroladdr", (unsigned long)map_to_sysmem(gd->fdt_blob));
- #if (CONFIG_IS_ENABLED(SAVE_PREV_BL_INITRAMFS_START_ADDR) || \ + #if (IS_ENABLED(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) || \ IS_ENABLED(CONFIG_SAVE_PREV_BL_FDT_ADDR)) save_prev_bl_data(); #endif

This converts 2 usages of this option to the non-SPL form, since there is no SPL_SEC_FIRMWARE_ARMV8_PSCI defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/arm/cpu/armv8/cpu-dt.c | 2 +- arch/arm/lib/bootm-fdt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c index 9bfe3815e51..afb2dd6c5b6 100644 --- a/arch/arm/cpu/armv8/cpu-dt.c +++ b/arch/arm/cpu/armv8/cpu-dt.c @@ -18,7 +18,7 @@ __weak int psci_update_dt(void *fdt) * number to support detecting PSCI dynamically and then switching * the SMP boot method between PSCI and spin-table. */ - if (CONFIG_IS_ENABLED(SEC_FIRMWARE_ARMV8_PSCI) && + if (IS_ENABLED(CONFIG_SEC_FIRMWARE_ARMV8_PSCI) && sec_firmware_support_psci_version() == PSCI_INVALID_VER) return 0;
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c index 29020bd1c6b..69e688f677f 100644 --- a/arch/arm/lib/bootm-fdt.c +++ b/arch/arm/lib/bootm-fdt.c @@ -64,7 +64,7 @@ int arch_fixup_fdt(void *blob) #endif
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV8_PSCI) || \ - CONFIG_IS_ENABLED(SEC_FIRMWARE_ARMV8_PSCI) + IS_ENABLED(CONFIG_SEC_FIRMWARE_ARMV8_PSCI) ret = psci_update_dt(blob); if (ret) return ret;

On Sun, Feb 05, 2023 at 05:55:04PM -0700, Simon Glass wrote:
This converts 2 usages of this option to the non-SPL form, since there is no SPL_SEC_FIRMWARE_ARMV8_PSCI defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
This usage avoids adding the fixup for arch_fixup_fdt to SPL where we don't need it.

Hi Tom,
On Wed, 8 Feb 2023 at 18:19, Tom Rini trini@konsulko.com wrote:
On Sun, Feb 05, 2023 at 05:55:04PM -0700, Simon Glass wrote:
This converts 2 usages of this option to the non-SPL form, since there is no SPL_SEC_FIRMWARE_ARMV8_PSCI defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
This usage avoids adding the fixup for arch_fixup_fdt to SPL where we don't need it.
I'll add this to config_nospl
Regards, Simon

This converts 1 usage of this option to the non-SPL form, since there is no SPL_SPI_FLASH_BAR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/mtd/spi/spi-nor-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 2c3116ee530..d410ae58953 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -3894,7 +3894,7 @@ void spi_nor_set_fixups(struct spi_nor *nor) } }
- if (CONFIG_IS_ENABLED(SPI_FLASH_BAR) && + if (IS_ENABLED(CONFIG_SPI_FLASH_BAR) && !strcmp(nor->info->name, "s25fl256l")) nor->fixups = &s25fl256l_fixups; #endif

On Sun, Feb 05, 2023 at 05:55:08PM -0700, Simon Glass wrote:
This converts 1 usage of this option to the non-SPL form, since there is no SPL_SPI_FLASH_BAR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
This is used to avoid unused code on at least xilinx_zynqmp_virt.

Hi Tom,
On Wed, 8 Feb 2023 at 18:30, Tom Rini trini@konsulko.com wrote:
On Sun, Feb 05, 2023 at 05:55:08PM -0700, Simon Glass wrote:
This converts 1 usage of this option to the non-SPL form, since there is no SPL_SPI_FLASH_BAR defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
This is used to avoid unused code on at least xilinx_zynqmp_virt.
I'll add this to config_nospl
Regards, Simon

This converts 2 usages of this option to the non-SPL form, since there is no SPL_SPI_FLASH_MACRONIX defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/mtd/spi/spi-nor-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index d410ae58953..3f97acdb18c 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -3645,7 +3645,7 @@ static struct spi_nor_fixups mt35xu512aba_fixups = { }; #endif /* CONFIG_SPI_FLASH_MT35XU */
-#if CONFIG_IS_ENABLED(SPI_FLASH_MACRONIX) +#if IS_ENABLED(CONFIG_SPI_FLASH_MACRONIX) /** * spi_nor_macronix_octal_dtr_enable() - Enable octal DTR on Macronix flashes. * @nor: pointer to a 'struct spi_nor' @@ -3904,7 +3904,7 @@ void spi_nor_set_fixups(struct spi_nor *nor) nor->fixups = &mt35xu512aba_fixups; #endif
-#if CONFIG_IS_ENABLED(SPI_FLASH_MACRONIX) +#if IS_ENABLED(CONFIG_SPI_FLASH_MACRONIX) nor->fixups = ¯onix_octal_fixups; #endif /* SPI_FLASH_MACRONIX */ }

On Sun, Feb 05, 2023 at 05:55:09PM -0700, Simon Glass wrote:
This converts 2 usages of this option to the non-SPL form, since there is no SPL_SPI_FLASH_MACRONIX defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
drivers/mtd/spi/spi-nor-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
This increases size on at least xilinx_zynqmp_virt.

Hi Tom,
On Thu, 9 Feb 2023 at 10:06, Tom Rini trini@konsulko.com wrote:
On Sun, Feb 05, 2023 at 05:55:09PM -0700, Simon Glass wrote:
This converts 2 usages of this option to the non-SPL form, since there is no SPL_SPI_FLASH_MACRONIX defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
drivers/mtd/spi/spi-nor-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
This increases size on at least xilinx_zynqmp_virt.
I'll add this to config_nospl
Regards, Simon

This converts 1 usage of this option to the non-SPL form, since there is no SPL_SPLASH_SOURCE defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
common/splash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/splash.c b/common/splash.c index 2e466a8a0f5..245ff680ebd 100644 --- a/common/splash.c +++ b/common/splash.c @@ -89,7 +89,7 @@ static inline int splash_video_logo_load(void) { return -ENOSYS; }
__weak int splash_screen_prepare(void) { - if (CONFIG_IS_ENABLED(SPLASH_SOURCE)) + if (IS_ENABLED(CONFIG_SPLASH_SOURCE)) return splash_source_load(default_splash_locations, ARRAY_SIZE(default_splash_locations));

This converts 3 usages of this option to the non-SPL form, since there is no SPL_TARGET_LX2160ARDB defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
board/freescale/lx2160a/lx2160a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index cf5b1ee46e0..d8a86cdf618 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -676,7 +676,7 @@ void board_quiesce_devices(void) } #endif
-#if CONFIG_IS_ENABLED(TARGET_LX2160ARDB) +#if IS_ENABLED(CONFIG_TARGET_LX2160ARDB) int fdt_fixup_add_thermal(void *blob, int mux_node, int channel, int reg) { int err; @@ -798,7 +798,7 @@ int ft_board_setup(void *blob, struct bd_info *bd) u64 mc_memory_size = 0; u16 total_memory_banks; int err; -#if CONFIG_IS_ENABLED(TARGET_LX2160ARDB) +#if IS_ENABLED(CONFIG_TARGET_LX2160ARDB) u8 board_rev; #endif
@@ -862,7 +862,7 @@ int ft_board_setup(void *blob, struct bd_info *bd) #endif fdt_fixup_icid(blob);
-#if CONFIG_IS_ENABLED(TARGET_LX2160ARDB) +#if IS_ENABLED(CONFIG_TARGET_LX2160ARDB) board_rev = (QIXIS_READ(arch) & 0xf) - 1 + 'A'; if (board_rev == 'C') fdt_fixup_i2c_thermal_node(blob);

This converts 2 usages of this option to the non-SPL form, since there is no SPL_TEN64_CONTROLLER defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
board/traverse/ten64/ten64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/traverse/ten64/ten64.c b/board/traverse/ten64/ten64.c index 9e4c84ad2f4..5dfb7165c0e 100644 --- a/board/traverse/ten64/ten64.c +++ b/board/traverse/ten64/ten64.c @@ -97,7 +97,7 @@ int checkboard(void) printf("Unknown boot source %d\n", src);
puts("Controller: "); - if (CONFIG_IS_ENABLED(TEN64_CONTROLLER)) { + if (IS_ENABLED(CONFIG_TEN64_CONTROLLER)) { /* Driver not compatible with alpha/beta board MCU firmware */ if (board_rev <= TEN64_BOARD_REV_C) { if (ten64_read_board_info(&boardinfo)) { @@ -375,7 +375,7 @@ static void ten64_board_retimer_ds110df410_init(void) /* Retimer power cycle not implemented on early board * revisions/controller firmwares */ - if (CONFIG_IS_ENABLED(TEN64_CONTROLLER) && + if (IS_ENABLED(CONFIG_TEN64_CONTROLLER) && board_rev >= TEN64_BOARD_REV_C) { ret = board_cycle_retimer(&retim_dev); if (ret) {

This converts 2 usages of this option to the non-SPL form, since there is no SPL_USB_KEYBOARD defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/x86/cpu/coreboot/coreboot.c | 2 +- arch/x86/cpu/efi/payload.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index aaa5ae112e4..d7eedbd7436 100644 --- a/arch/x86/cpu/coreboot/coreboot.c +++ b/arch/x86/cpu/coreboot/coreboot.c @@ -77,7 +77,7 @@ static void board_final_init(void) int last_stage_init(void) { /* start usb so that usb keyboard can be used as input device */ - if (CONFIG_IS_ENABLED(USB_KEYBOARD)) + if (IS_ENABLED(CONFIG_USB_KEYBOARD)) usb_init();
board_final_init(); diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index 1c28a43778e..19a25dd6408 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -171,7 +171,7 @@ int reserve_arch(void) int last_stage_init(void) { /* start usb so that usb keyboard can be used as input device */ - if (CONFIG_IS_ENABLED(USB_KEYBOARD)) + if (IS_ENABLED(CONFIG_USB_KEYBOARD)) usb_init();
return 0;

This converts 1 usage of this option to the non-SPL form, since there is no SPL_VIDEO_BPP16 defined in Kconfig
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
drivers/video/video-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 0ce376ca3f1..f36970e0420 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -196,7 +196,7 @@ u32 video_index_to_colour(struct video_priv *priv, unsigned int idx) { switch (priv->bpix) { case VIDEO_BPP16: - if (CONFIG_IS_ENABLED(VIDEO_BPP16)) { + if (IS_ENABLED(CONFIG_VIDEO_BPP16)) { return ((colours[idx].r >> 3) << 11) | ((colours[idx].g >> 2) << 5) | ((colours[idx].b >> 3) << 0);
participants (3)
-
Heinrich Schuchardt
-
Simon Glass
-
Tom Rini