From: Leo Liang <ycliang@andestech.com>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Rick Chen <rick@andestech.com>,
U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH] riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED
Date: Mon, 1 Nov 2021 16:56:43 +0800 [thread overview]
Message-ID: <YX+ry9rB2M2qBBgq@ubuntu02> (raw)
In-Reply-To: <CAEUhbmUMFqeOvNhq9+UA4ZkN4igqOLwcHThhay=hMZ3JMdw3mQ@mail.gmail.com>
On Mon, Nov 01, 2021 at 04:37:32PM +0800, Bin Meng wrote:
> Hi Leo,
>
> On Mon, Nov 1, 2021 at 3:49 PM Leo Liang <ycliang@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@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@gmail.com>
>
Will do. Thanks!
Best regards,
Leo
> Regards,
> Bin
prev parent reply other threads:[~2021-11-01 8:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 8:59 [PATCH] riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED Leo Yu-Chi Liang
[not found] ` <HK0PR03MB2994A2BC40279DC7AF913DE2C18A9@HK0PR03MB2994.apcprd03.prod.outlook.com>
2021-11-01 5:41 ` Rick Chen
2021-11-01 6:04 ` Bin Meng
2021-11-01 7:49 ` Leo Liang
2021-11-01 8:37 ` Bin Meng
2021-11-01 8:56 ` Leo Liang [this message]
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=YX+ry9rB2M2qBBgq@ubuntu02 \
--to=ycliang@andestech.com \
--cc=bmeng.cn@gmail.com \
--cc=rick@andestech.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.