[PATCH] riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED
Bin Meng
bmeng.cn at gmail.com
Mon Nov 1 09:37:32 CET 2021
Hi Leo,
On Mon, Nov 1, 2021 at 3:49 PM Leo Liang <ycliang at andestech.com> wrote:
>
> Hi Bin,
> On Mon, Nov 01, 2021 at 02:04:48PM +0800, Bin Meng wrote:
> > Hi Leo,
> >
> > On Wed, Oct 27, 2021 at 4:59 PM Leo Yu-Chi Liang <ycliang at andestech.com> wrote:
> > >
> > > According to ./include/linux/kconfig.h,
> > > CONFIG_IS_ENABLED(OF_BOARD) expands to 0
> > > when CONFIG_SPL_BUILD is defined because
> > > there is no CONFIG_SPL_OF_BOARD.
> >
> > Why is the change?
> >
>
> The original code was
>
> void *board_fdt_blob_setup(void)
> {
> #if CONFIG_IS_ENABLED(OF_BOARD)
> return (void *)(ulong)gd->arch.firmware_fdt_addr;
> #elif CONFIG_IS_ENABLED(OF_SEPARATE)
> return (void *)CONFIG_SYS_FDT_BASE;
> #else
> return NULL;
> }
>
> But the "return (void *)(ulong)gd->arch.firmware_fdt_addr;" does not get
> compiled even if OF_BOARD is selected when building
> ae350_*_spl_*_defconfig, thus this patch.
>
> The reason is because ./include/linux/kconfig.h states
> "CONFIG_IS_ENABLED(FOO) expands to 1 if CONFIG_SPL_BUILD is defined
> and CONFIG_SPL_FOO is set to 'y'".
> However, we don't have CONFIG_SPL_OF_BOARD, so
> CONFIG_IS_ENABLED(OF_BOARD) only expands to 0.
>
Thanks!
Please add:
Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards")
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Regards,
Bin
More information about the U-Boot
mailing list