public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 10/16] mips: unconditionally enable u_boot_list section in u-boot-spl.lds
Date: Wed, 8 Jan 2020 17:11:16 +0100	[thread overview]
Message-ID: <69d71ca0-96c4-5561-7fee-69886483ad4b@gmail.com> (raw)
In-Reply-To: <1578452505-7007-1-git-send-email-weijie.gao@mediatek.com>



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

  reply	other threads:[~2020-01-08 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-01-09  8:40   ` Weijie Gao

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=69d71ca0-96c4-5561-7fee-69886483ad4b@gmail.com \
    --to=daniel.schwierzeck@gmail.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