[U-Boot] [PATCH 5/5] ARM: mxs: support full SPL framework
Stefano Babic
sbabic at denx.de
Fri Apr 27 09:00:05 UTC 2018
On 21/04/2018 17:11, Mans Rullgard wrote:
> This allows using the full SPL framework on mxs devices. In this
> mode, the u-boot.sb image loaded by the boot ROM contains only the
> SPL which then loads U-Boot proper or a kernel in falcon mode.
>
> Signed-off-by: Mans Rullgard <mans at mansr.com>
> ---
> arch/arm/Kconfig | 2 +-
> arch/arm/cpu/arm926ejs/mxs/Makefile | 4 ++--
> arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg | 5 +++++
> arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg | 6 ++++++
> arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 2 ++
> include/configs/mxs.h | 2 ++
> 6 files changed, 18 insertions(+), 3 deletions(-)
> create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg
> create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 7212fc5afa72..0acdd162b4b3 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1352,7 +1352,7 @@ source "arch/arm/Kconfig.debug"
> endmenu
>
> config SPL_LDSCRIPT
> - default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if ARCH_MX23 || ARCH_MX28
> + default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
> default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
> default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/Makefile b/arch/arm/cpu/arm926ejs/mxs/Makefile
> index 71c2c0e7b40c..83b05acfa4eb 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/Makefile
> +++ b/arch/arm/cpu/arm926ejs/mxs/Makefile
> @@ -14,8 +14,8 @@ obj-y += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o
> endif
>
> # Specify the target for use in elftosb call
> -MKIMAGE_TARGET-$(CONFIG_MX23) = mxsimage.mx23.cfg
> -MKIMAGE_TARGET-$(CONFIG_MX28) = mxsimage.mx28.cfg
> +MKIMAGE_TARGET-$(CONFIG_MX23) = mxsimage$(CONFIG_SPL_FRAMEWORK:%=-spl).mx23.cfg
> +MKIMAGE_TARGET-$(CONFIG_MX28) = mxsimage$(CONFIG_SPL_FRAMEWORK:%=-spl).mx28.cfg
>
> # Generate HAB-capable IVT
> #
> diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg
> new file mode 100644
> index 000000000000..ab2183ed3795
> --- /dev/null
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg
> @@ -0,0 +1,5 @@
> +DISPLAYPROGRESS
> +SECTION 0x0 BOOTABLE
> + TAG LAST
> + LOAD 0x1000 spl/u-boot-spl.bin
> + CALL 0x1000 0x0
> diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg
> new file mode 100644
> index 000000000000..0d95064ff7f1
> --- /dev/null
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg
> @@ -0,0 +1,6 @@
> +DISPLAYPROGRESS
> +SECTION 0x0 BOOTABLE
> + TAG LAST
> + LOAD 0x1000 spl/u-boot-spl.bin
> + LOAD IVT 0x8000 0x1000
> + CALL HAB 0x8000 0x0
> diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> index 0c3925640dc9..bc39465fc4e0 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> @@ -146,6 +146,7 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
> }
> }
>
> +#ifndef CONFIG_SPL_FRAMEWORK
> /* Support aparatus */
> inline void board_init_f(unsigned long bootflag)
> {
> @@ -158,3 +159,4 @@ inline void board_init_r(gd_t *id, ulong dest_addr)
> for (;;)
> ;
> }
> +#endif
> diff --git a/include/configs/mxs.h b/include/configs/mxs.h
> index f07f81c8415c..0fe0770e13f0 100644
> --- a/include/configs/mxs.h
> +++ b/include/configs/mxs.h
> @@ -44,8 +44,10 @@
> /* Startup hooks */
>
> /* SPL */
> +#ifndef CONFIG_SPL_FRAMEWORK
> #define CONFIG_SPL_NO_CPU_SUPPORT_CODE
> #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mxs"
> +#endif
>
> /* Memory sizes */
> #define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
>
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list