From: Benjamin Lemouzy <blemouzy.ml@gmail.com>
To: Peng Fan <peng.fan@oss.nxp.com>
Cc: u-boot@lists.denx.de, alison.wang@nxp.com, sjg@chromium.org,
trini@konsulko.com, olteanv@gmail.com,
Benjamin Lemouzy <blemouzy@centralp.fr>
Subject: Re: [PATCH] board: freescale: fix LS1021a build
Date: Fri, 28 Feb 2025 09:16:08 +0100 [thread overview]
Message-ID: <20250228091608.7c14c49e@gmail.com> (raw)
In-Reply-To: <20250228041001.GA30605@nxa18884-linux>
Hi Peng,
On Fri, 28 Feb 2025 12:10:01 +0800
Peng Fan <peng.fan@oss.nxp.com> wrote:
> On Mon, Feb 17, 2025 at 04:36:03PM +0100, blemouzy.ml@gmail.com wrote:
> >From: Benjamin Lemouzy <blemouzy@centralp.fr>
> >
> >Fix build error "undefined reference to `is_warm_boot'" when
> >ls1021atsn and ls1021atwr boards are built with CONFIG_SPL=y and
> >CONFIG_DEEP_SLEEP=n.
> >
> >Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
> >---
> > board/freescale/ls1021atsn/ls1021atsn.c | 4 ++++
> > board/freescale/ls1021atwr/ls1021atwr.c | 4 ++++
> > 2 files changed, 8 insertions(+)
> >
> >diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
> >index d1acccec11..6d64df7cc4 100644
> >--- a/board/freescale/ls1021atsn/ls1021atsn.c
> >+++ b/board/freescale/ls1021atsn/ls1021atsn.c
> >@@ -159,7 +159,9 @@ int board_early_init_f(void)
> > #ifdef CONFIG_XPL_BUILD
> > void board_init_f(ulong dummy)
> > {
> >+#if defined(CONFIG_DEEP_SLEEP)
> > void (*second_uboot)(void);
> >+#endif
> >
> > /* Clear the BSS */
> > memset(__bss_start, 0, __bss_end - __bss_start);
> >@@ -181,6 +183,7 @@ void board_init_f(ulong dummy)
> > enable_layerscape_ns_access();
> > #endif
> >
> >+#if defined(CONFIG_DEEP_SLEEP)
> > /*
> > * if it is woken up from deep sleep, then jump to second
> > * stage U-Boot and continue executing without recopying
> >@@ -191,6 +194,7 @@ void board_init_f(ulong dummy)
> > second_uboot = (void (*)(void))CONFIG_TEXT_BASE;
> > second_uboot();
> > }
> >+#endif
>
> Please use 'if (CONFIG_IS_ENABLED(DEEP_SLEEP) {}'
> Then no need guard 'void (*second_uboot)(void)' with if defined.
I was torn between using the new syntax and keeping coherency with the
rest of the file: I will always use new syntax now!
I saw you submitted the V2: thanks for that (and the review).
Benjamin
>
> >
> > board_init_r(NULL, 0);
> > }
> >diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
> >index cc9665c041..937e766069 100644
> >--- a/board/freescale/ls1021atwr/ls1021atwr.c
> >+++ b/board/freescale/ls1021atwr/ls1021atwr.c
> >@@ -410,7 +410,9 @@ int board_early_init_f(void)
> > #ifdef CONFIG_XPL_BUILD
> > void board_init_f(ulong dummy)
> > {
> >+#if defined(CONFIG_DEEP_SLEEP)
> > void (*second_uboot)(void);
> >+#endif
> >
> > /* Clear the BSS */
> > memset(__bss_start, 0, __bss_end - __bss_start);
> >@@ -432,6 +434,7 @@ void board_init_f(ulong dummy)
> > enable_layerscape_ns_access();
> > #endif
> >
> >+#if defined(CONFIG_DEEP_SLEEP)
> > /*
> > * if it is woken up from deep sleep, then jump to second
> > * stage uboot and continue executing without recopying
> >@@ -442,6 +445,7 @@ void board_init_f(ulong dummy)
> > second_uboot = (void (*)(void))CONFIG_TEXT_BASE;
> > second_uboot();
> > }
> >+#endif
>
> Ditto.
>
> Thanks,
> Peng
> >
> > board_init_r(NULL, 0);
> > }
> >--
> >2.43.0
> >
prev parent reply other threads:[~2025-02-28 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 15:36 [PATCH] board: freescale: fix LS1021a build blemouzy.ml
2025-02-28 4:10 ` Peng Fan
2025-02-28 8:16 ` Benjamin Lemouzy [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=20250228091608.7c14c49e@gmail.com \
--to=blemouzy.ml@gmail.com \
--cc=alison.wang@nxp.com \
--cc=blemouzy@centralp.fr \
--cc=olteanv@gmail.com \
--cc=peng.fan@oss.nxp.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox