[PATCH] common: spl: spl_nand: make CONFIG_SYS_NAND_U_BOOT_OFFS optional in spl_nand_get_uboot_raw_page()

Tom Rini trini at konsulko.com
Fri Apr 10 16:44:57 CEST 2026


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 at 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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260410/433b8928/attachment.sig>


More information about the U-Boot mailing list