From: Weijie Gao <weijie.gao@mediatek.com>
To: Tom Rini <trini@konsulko.com>
Cc: <u-boot@lists.denx.de>,
GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>
Subject: Re: [PATCH] common: spl: spl_nand: make CONFIG_SYS_NAND_U_BOOT_OFFS optional in spl_nand_get_uboot_raw_page()
Date: Mon, 13 Apr 2026 11:53:12 +0800 [thread overview]
Message-ID: <f2e47f5ce68168f71492e7bfa207f00ca13cf026.camel@mediatek.com> (raw)
In-Reply-To: <20260410144457.GU41863@bill-the-cat>
Hi Tom,
On Fri, 2026-04-10 at 08:44 -0600, Tom Rini wrote:
> On Fri, Apr 10, 2026 at 04:49:33PM +0800, Weijie Gao wrote:
>
> > As spl_nand_get_uboot_raw_page() is a weak function, when a board
> > wants to
> > override it, the CONFIG_SYS_NAND_U_BOOT_OFFS becomes meaningless
> > within
> > this function.
> >
> > This patch allows spl_nand_get_uboot_raw_page() being compiled
> > without
> > CONFIG_SYS_NAND_U_BOOT_OFFS being defined.
> >
> > Note: this is available only when both CONFIG_SPL_NAND_RAW_ONLY and
> > CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND are not defined.
> >
> > Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
> > ---
> > common/spl/spl_nand.c | 4 ++++
> > 1 file changed, 4 insertions(+)
>
> I think the bug here is that when SYS_NAND_U_BOOT_LOCATIONS isn't
> defined, we should still be able to override
> spl_nand_get_uboot_raw_page
> (with an implementation that does not use
> CONFIG_SYS_NAND_U_BOOT_OFFS).
> Can you please re-examine the code with that in mind? Thanks!
>
So I come up with the following idea:
1. With my current path, replace all reference to
CONFIG_SYS_NAND_U_BOOT_OFFS with spl_nand_get_uboot_raw_page()
2. Add a new weak function, spl_nand_get_uboot_raw_page_redund(), to
wrap the CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND macro, and do the same
modification as spl_nand_get_uboot_raw_page() do.
I'll send new patch later
Weijie
prev parent reply other threads:[~2026-04-13 3:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 8:49 [PATCH] common: spl: spl_nand: make CONFIG_SYS_NAND_U_BOOT_OFFS optional in spl_nand_get_uboot_raw_page() Weijie Gao
2026-04-10 14:44 ` Tom Rini
2026-04-13 3:53 ` Weijie Gao [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=f2e47f5ce68168f71492e7bfa207f00ca13cf026.camel@mediatek.com \
--to=weijie.gao@mediatek.com \
--cc=GSS_MTK_Uboot_upstream@mediatek.com \
--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