diff mbox series

[09/17] fdtdec: Use CONFIG_IS_ENABLED in board_fdt_blob_setup()

Message ID 20210114032957.483086-10-sjg@chromium.org
State Accepted
Commit 0a2aaab0b678fd1778ff2fc59d0770fc82995532
Delegated to: Tom Rini
Headers show
Series Various minor clean-ups and improvements | expand

Commit Message

Simon Glass Jan. 14, 2021, 3:29 a.m. UTC
This setting may be different in SPL and TPL. Update the code to check
the correct setting.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Jan. 28, 2021, 11:58 p.m. UTC | #1
On Wed, Jan 13, 2021 at 08:29:49PM -0700, Simon Glass wrote:

> This setting may be different in SPL and TPL. Update the code to check
> the correct setting.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
Peter Robinson Feb. 14, 2021, 6:50 p.m. UTC | #2
Hi Simon,

On Thu, Jan 28, 2021 at 11:59 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Wed, Jan 13, 2021 at 08:29:49PM -0700, Simon Glass wrote:
>
> > This setting may be different in SPL and TPL. Update the code to check
> > the correct setting.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Applied to u-boot/master, thanks!

This breaks booting on at least rk3399 based devices for me with the
following error:

U-Boot TPL 2021.04-rc1 (Feb 01 2021 - 00:00:00)
Missing DTB
### ERROR ### Please RESET the board ###
Jesper Schmitz Mouridsen Feb. 14, 2021, 7:05 p.m. UTC | #3
On 14.02.2021 19.50, Peter Robinson wrote:
> Hi Simon,
>
> On Thu, Jan 28, 2021 at 11:59 PM Tom Rini <trini@konsulko.com> wrote:
>> On Wed, Jan 13, 2021 at 08:29:49PM -0700, Simon Glass wrote:
>>
>>> This setting may be different in SPL and TPL. Update the code to check
>>> the correct setting.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> Applied to u-boot/master, thanks!
> This breaks booting on at least rk3399 based devices for me with the
> following error:
>
> U-Boot TPL 2021.04-rc1 (Feb 01 2021 - 00:00:00)
> Missing DTB
> ### ERROR ### Please RESET the board ###
Also see https://lists.denx.de/pipermail/u-boot/2021-February/440263.html
Tom Rini Feb. 14, 2021, 7:08 p.m. UTC | #4
On Sun, Feb 14, 2021 at 08:05:33PM +0100, Jesper Schmitz Mouridsen wrote:
> 
> On 14.02.2021 19.50, Peter Robinson wrote:
> > Hi Simon,
> > 
> > On Thu, Jan 28, 2021 at 11:59 PM Tom Rini <trini@konsulko.com> wrote:
> > > On Wed, Jan 13, 2021 at 08:29:49PM -0700, Simon Glass wrote:
> > > 
> > > > This setting may be different in SPL and TPL. Update the code to check
> > > > the correct setting.
> > > > 
> > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > Applied to u-boot/master, thanks!
> > This breaks booting on at least rk3399 based devices for me with the
> > following error:
> > 
> > U-Boot TPL 2021.04-rc1 (Feb 01 2021 - 00:00:00)
> > Missing DTB
> > ### ERROR ### Please RESET the board ###
> Also see https://lists.denx.de/pipermail/u-boot/2021-February/440263.html

So we have two forms of bug.  sunxi (your link above Jesper) needs
SPL_SEPARATE_BSS to be set I think.  Peter's problem is that there is no
TPL_SEPARATE_BSS which is a harder problem to solve quickly.  I'll post
a revert with you both Reported-by shortly, thanks.
Tom Rini Feb. 14, 2021, 7:10 p.m. UTC | #5
On Sun, Feb 14, 2021 at 02:08:08PM -0500, Tom Rini wrote:
> On Sun, Feb 14, 2021 at 08:05:33PM +0100, Jesper Schmitz Mouridsen wrote:
> > 
> > On 14.02.2021 19.50, Peter Robinson wrote:
> > > Hi Simon,
> > > 
> > > On Thu, Jan 28, 2021 at 11:59 PM Tom Rini <trini@konsulko.com> wrote:
> > > > On Wed, Jan 13, 2021 at 08:29:49PM -0700, Simon Glass wrote:
> > > > 
> > > > > This setting may be different in SPL and TPL. Update the code to check
> > > > > the correct setting.
> > > > > 
> > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > Applied to u-boot/master, thanks!
> > > This breaks booting on at least rk3399 based devices for me with the
> > > following error:
> > > 
> > > U-Boot TPL 2021.04-rc1 (Feb 01 2021 - 00:00:00)
> > > Missing DTB
> > > ### ERROR ### Please RESET the board ###
> > Also see https://lists.denx.de/pipermail/u-boot/2021-February/440263.html
> 
> So we have two forms of bug.  sunxi (your link above Jesper) needs
> SPL_SEPARATE_BSS to be set I think.  Peter's problem is that there is no
> TPL_SEPARATE_BSS which is a harder problem to solve quickly.  I'll post
> a revert with you both Reported-by shortly, thanks.

Er, wait.  I'm a bit less clear on the why on sunxi at least.  I'm going
to post the revert shortly all the same.
Peter Robinson Feb. 14, 2021, 7:20 p.m. UTC | #6
On Sun, Feb 14, 2021 at 7:10 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Sun, Feb 14, 2021 at 02:08:08PM -0500, Tom Rini wrote:
> > On Sun, Feb 14, 2021 at 08:05:33PM +0100, Jesper Schmitz Mouridsen wrote:
> > >
> > > On 14.02.2021 19.50, Peter Robinson wrote:
> > > > Hi Simon,
> > > >
> > > > On Thu, Jan 28, 2021 at 11:59 PM Tom Rini <trini@konsulko.com> wrote:
> > > > > On Wed, Jan 13, 2021 at 08:29:49PM -0700, Simon Glass wrote:
> > > > >
> > > > > > This setting may be different in SPL and TPL. Update the code to check
> > > > > > the correct setting.
> > > > > >
> > > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > Applied to u-boot/master, thanks!
> > > > This breaks booting on at least rk3399 based devices for me with the
> > > > following error:
> > > >
> > > > U-Boot TPL 2021.04-rc1 (Feb 01 2021 - 00:00:00)
> > > > Missing DTB
> > > > ### ERROR ### Please RESET the board ###
> > > Also see https://lists.denx.de/pipermail/u-boot/2021-February/440263.html
> >
> > So we have two forms of bug.  sunxi (your link above Jesper) needs
> > SPL_SEPARATE_BSS to be set I think.  Peter's problem is that there is no
> > TPL_SEPARATE_BSS which is a harder problem to solve quickly.  I'll post
> > a revert with you both Reported-by shortly, thanks.
>
> Er, wait.  I'm a bit less clear on the why on sunxi at least.  I'm going
> to post the revert shortly all the same.

The sunxi bits seem OK with 2021.04-rc1 from my testing, at least for
this problem, to now in my testing it's only been the rockchip stuff
that's had issues but I'm still getting through all my devices.

Peter
Tom Rini Feb. 14, 2021, 8:25 p.m. UTC | #7
On Sun, Feb 14, 2021 at 07:20:45PM +0000, Peter Robinson wrote:
> On Sun, Feb 14, 2021 at 7:10 PM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sun, Feb 14, 2021 at 02:08:08PM -0500, Tom Rini wrote:
> > > On Sun, Feb 14, 2021 at 08:05:33PM +0100, Jesper Schmitz Mouridsen wrote:
> > > >
> > > > On 14.02.2021 19.50, Peter Robinson wrote:
> > > > > Hi Simon,
> > > > >
> > > > > On Thu, Jan 28, 2021 at 11:59 PM Tom Rini <trini@konsulko.com> wrote:
> > > > > > On Wed, Jan 13, 2021 at 08:29:49PM -0700, Simon Glass wrote:
> > > > > >
> > > > > > > This setting may be different in SPL and TPL. Update the code to check
> > > > > > > the correct setting.
> > > > > > >
> > > > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > > Applied to u-boot/master, thanks!
> > > > > This breaks booting on at least rk3399 based devices for me with the
> > > > > following error:
> > > > >
> > > > > U-Boot TPL 2021.04-rc1 (Feb 01 2021 - 00:00:00)
> > > > > Missing DTB
> > > > > ### ERROR ### Please RESET the board ###
> > > > Also see https://lists.denx.de/pipermail/u-boot/2021-February/440263.html
> > >
> > > So we have two forms of bug.  sunxi (your link above Jesper) needs
> > > SPL_SEPARATE_BSS to be set I think.  Peter's problem is that there is no
> > > TPL_SEPARATE_BSS which is a harder problem to solve quickly.  I'll post
> > > a revert with you both Reported-by shortly, thanks.
> >
> > Er, wait.  I'm a bit less clear on the why on sunxi at least.  I'm going
> > to post the revert shortly all the same.
> 
> The sunxi bits seem OK with 2021.04-rc1 from my testing, at least for
> this problem, to now in my testing it's only been the rockchip stuff
> that's had issues but I'm still getting through all my devices.

Yup.  I need to fix my mental map of "pine* == sunxi", that was the
confusion I had.
diff mbox series

Patch

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 54f7a1fe477..a2d2fb4e1fe 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1253,7 +1253,7 @@  __weak void *board_fdt_blob_setup(void)
 	void *fdt_blob = NULL;
 #ifdef CONFIG_SPL_BUILD
 	/* FDT is at end of BSS unless it is in a different memory region */
-	if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS))
+	if (CONFIG_IS_ENABLED(SEPARATE_BSS))
 		fdt_blob = (ulong *)&_image_binary_end;
 	else
 		fdt_blob = (ulong *)&__bss_end;