From patchwork Wed Apr 8 08:09:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 237387 List-Id: U-Boot discussion From: sr at denx.de (Stefan Roese) Date: Wed, 8 Apr 2020 10:09:29 +0200 Subject: [PATCH 13/26 v6] mips: add an option to enable u_boot_list section for SPL loaders in u-boot-spl.lds In-Reply-To: <20200408080942.7694-1-sr@denx.de> References: <20200408080942.7694-1-sr@denx.de> Message-ID: <20200408080942.7694-14-sr@denx.de> From: 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 adds an option CONFIG_SPL_LOADER_SUPPORT in conjunction with CONFIG_SPL_DM surrounding the u_boot_list section to make sure SPL image loaders can be correctly built into u-boot SPL without DM enabled. Reviewed-by: Stefan Roese Reviewed-by: Daniel Schwierzeck Signed-off-by: Weijie Gao --- Changes since v3: none arch/mips/Kconfig | 6 ++++++ arch/mips/cpu/u-boot-spl.lds | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5f82caf8be..7b9d0072eb 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -335,6 +335,12 @@ config SPL_INIT_STACK_WITHOUT_MALLOC_F malloc space. Platform should set the malloc_base later when DRAM is ready to use. +config SPL_LOADER_SUPPORT + bool + default n + help + Enable this option if you want to use SPL loaders without DM enabled. + endmenu menu "OS boot interface" diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds index e467491639..28ea4f2a48 100644 --- a/arch/mips/cpu/u-boot-spl.lds +++ b/arch/mips/cpu/u-boot-spl.lds @@ -27,7 +27,7 @@ SECTIONS *(SORT_BY_ALIGNMENT(.sdata*)) } > .spl_mem -#ifdef CONFIG_SPL_DM +#if defined(CONFIG_SPL_DM) || defined(CONFIG_SPL_LOADER_SUPPORT) . = ALIGN(4); .u_boot_list : { KEEP(*(SORT(.u_boot_list*)));