* [PATCH 10/16] mips: unconditionally enable u_boot_list section in u-boot-spl.lds
@ 2020-01-08 3:01 Weijie Gao
2020-01-08 16:11 ` Daniel Schwierzeck
0 siblings, 1 reply; 3+ messages in thread
From: Weijie Gao @ 2020-01-08 3:01 UTC (permalink / raw)
To: u-boot
u_boot_list is not only used by DM, but also by some SPL image load methods
such as spl_nor.c.
This patch removes CONFIG_SPL_DM surrounding the u_boot_list section to
make sure SPL image load methods can be correctly built into u-boot without
DM enabled.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/mips/cpu/u-boot-spl.lds | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
index d08d6222c4..cd143ab168 100644
--- a/arch/mips/cpu/u-boot-spl.lds
+++ b/arch/mips/cpu/u-boot-spl.lds
@@ -27,12 +27,10 @@ SECTIONS
*(SORT_BY_ALIGNMENT(.sdata*))
} > .spl_mem
-#ifdef CONFIG_SPL_DM
. = ALIGN(4);
.u_boot_list : {
KEEP(*(SORT(.u_boot_list*)));
} > .spl_mem
-#endif
. = ALIGN(4);
__image_copy_end = .;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 10/16] mips: unconditionally enable u_boot_list section in u-boot-spl.lds
2020-01-08 3:01 [PATCH 10/16] mips: unconditionally enable u_boot_list section in u-boot-spl.lds Weijie Gao
@ 2020-01-08 16:11 ` Daniel Schwierzeck
2020-01-09 8:40 ` Weijie Gao
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Schwierzeck @ 2020-01-08 16:11 UTC (permalink / raw)
To: u-boot
Am 08.01.20 um 04:01 schrieb Weijie Gao:
> u_boot_list is not only used by DM, but also by some SPL image load methods
> such as spl_nor.c.
>
> This patch removes CONFIG_SPL_DM surrounding the u_boot_list section to
> make sure SPL image load methods can be correctly built into u-boot without
> DM enabled.
>
> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
> ---
> arch/mips/cpu/u-boot-spl.lds | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
> index d08d6222c4..cd143ab168 100644
> --- a/arch/mips/cpu/u-boot-spl.lds
> +++ b/arch/mips/cpu/u-boot-spl.lds
> @@ -27,12 +27,10 @@ SECTIONS
> *(SORT_BY_ALIGNMENT(.sdata*))
> } > .spl_mem
>
> -#ifdef CONFIG_SPL_DM
> . = ALIGN(4);
> .u_boot_list : {
> KEEP(*(SORT(.u_boot_list*)));
> } > .spl_mem
> -#endif
unconditionally including this is a bad idea on SoC's with a very
constrained SRAM space (e.g. CI20 board) or in SPL/TPL scenarios.
One solution would be to replace #ifdef CONFIG_SPL_DM with something
like #ifdef CONFIG_MIPS_SPL_LIST and in Kconfig something like this:
config MIPS_SPL_LIST
bool "..."
default y if (SPL_DM | SPL_NOR_SUPPORT)
default n
Alternatively with an inverted semantic:
#ifndef CONFIG_MIPS_SPL_LIST_EXLCUDE
...
#endif
config MIPS_SPL_LIST_EXLCUDE
bool ""
default n
config ARCH_JZ47XX
...
select MIPS_SPL_LIST_EXLCUDE
>
> . = ALIGN(4);
> __image_copy_end = .;
>
--
- Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 10/16] mips: unconditionally enable u_boot_list section in u-boot-spl.lds
2020-01-08 16:11 ` Daniel Schwierzeck
@ 2020-01-09 8:40 ` Weijie Gao
0 siblings, 0 replies; 3+ messages in thread
From: Weijie Gao @ 2020-01-09 8:40 UTC (permalink / raw)
To: u-boot
On Wed, 2020-01-08 at 17:11 +0100, Daniel Schwierzeck wrote:
>
> Am 08.01.20 um 04:01 schrieb Weijie Gao:
> > u_boot_list is not only used by DM, but also by some SPL image load methods
> > such as spl_nor.c.
> >
> > This patch removes CONFIG_SPL_DM surrounding the u_boot_list section to
> > make sure SPL image load methods can be correctly built into u-boot without
> > DM enabled.
> >
> > Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
> > ---
> > arch/mips/cpu/u-boot-spl.lds | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
> > index d08d6222c4..cd143ab168 100644
> > --- a/arch/mips/cpu/u-boot-spl.lds
> > +++ b/arch/mips/cpu/u-boot-spl.lds
> > @@ -27,12 +27,10 @@ SECTIONS
> > *(SORT_BY_ALIGNMENT(.sdata*))
> > } > .spl_mem
> >
> > -#ifdef CONFIG_SPL_DM
> > . = ALIGN(4);
> > .u_boot_list : {
> > KEEP(*(SORT(.u_boot_list*)));
> > } > .spl_mem
> > -#endif
>
> unconditionally including this is a bad idea on SoC's with a very
> constrained SRAM space (e.g. CI20 board) or in SPL/TPL scenarios.
>
> One solution would be to replace #ifdef CONFIG_SPL_DM with something
> like #ifdef CONFIG_MIPS_SPL_LIST and in Kconfig something like this:
>
> config MIPS_SPL_LIST
> bool "..."
> default y if (SPL_DM | SPL_NOR_SUPPORT)
> default n
>
>
> Alternatively with an inverted semantic:
>
> #ifndef CONFIG_MIPS_SPL_LIST_EXLCUDE
> ...
> #endif
>
>
> config MIPS_SPL_LIST_EXLCUDE
> bool ""
> default n
>
> config ARCH_JZ47XX
> ...
> select MIPS_SPL_LIST_EXLCUDE
>
>
> >
> > . = ALIGN(4);
> > __image_copy_end = .;
> >
>
I think adding CONFIG_SPL_LOADER_SUPPORT is also OK:
#if defined(CONFIG_SPL_DM) || defined(CONFIG_SPL_LOADER_SUPPORT)
. = ALIGN(4);
.u_boot_list : {
KEEP(*(SORT(.u_boot_list*)));
} > .spl_mem
#endif
In mach Kconfig:
config SPL_LOADER_SUPPORT
bool
default y if SPL_NOR_SUPPORT
default n
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-09 8:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 3:01 [PATCH 10/16] mips: unconditionally enable u_boot_list section in u-boot-spl.lds Weijie Gao
2020-01-08 16:11 ` Daniel Schwierzeck
2020-01-09 8:40 ` Weijie Gao
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.