From 225d30b70846eb534bc6b607d67c959ab05beaa5 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Thu, 22 Jun 2017 23:38:36 +0200 Subject: spl: add a 'return to bootrom' boot method Some devices (e.g. the RK3368) have only limited SRAM, but provide support for loading the next boot stage after our SPL performs basic setup (e.g. DRAM). For target systems like these, we add a boot device BOOTROM that will invoke a board-specific hook to return to the bootrom (if supported). Signed-off-by: Philipp Tomsich Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- common/spl/Kconfig | 11 +++++++++++ common/spl/Makefile | 1 + common/spl/spl_bootrom.c | 27 +++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 common/spl/spl_bootrom.c (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 4de81392b0..ee767b7d18 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -25,6 +25,17 @@ config SPL_BOARD_INIT spl_board_init() from board_init_r(). This function should be provided by the board. +config SPL_BOOTROM_SUPPORT + bool "Support returning to the BOOTROM" + help + Some platforms (e.g. the Rockchip RK3368) provide support in their + ROM for loading the next boot-stage after performing basic setup + from the SPL stage. + + Enable this option, to return to the BOOTROM through the + BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the + boot device list, if not implemented for a given board) + config SPL_RAW_IMAGE_SUPPORT bool "Support SPL loading and booting of RAW images" default n if (ARCH_MX6 && (SPL_MMC_SUPPORT || SPL_SATA_SUPPORT)) diff --git a/common/spl/Makefile b/common/spl/Makefile index 47a64dd7d0..189b2727d3 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -10,6 +10,7 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_FRAMEWORK) += spl.o +obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_bootrom.o obj-$(CONFIG_SPL_LOAD_FIT) += spl_fit.o obj-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o obj-$(CONFIG_SPL_XIP_SUPPORT) += spl_xip.o diff --git a/common/spl/spl_bootrom.c b/common/spl/spl_bootrom.c new file mode 100644 index 0000000000..6804246d03 --- /dev/null +++ b/common/spl/spl_bootrom.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2017 Theobroma Systems Design und Consulting GmH + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +__weak void board_return_to_bootrom(void) +{ +} + +static int spl_return_to_bootrom(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) +{ + /* + * If the board implements a way to return to its ROM (with + * the expectation that the next stage of will be booted by + * the ROM), it will implement board_return_to_bootrom() and + * should not return from it. + */ + board_return_to_bootrom(); + return false; +} + +SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom); -- cgit v1.2.3 From a954fa320374fa1a6c924d087344ca59e77475f8 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Tue, 4 Jul 2017 14:24:53 +0200 Subject: spl: configure 'return to bootrom' separately for SPL and TPL On the RK3368, we want our TPL to use the 'return to bootrom' boot method (to have the bootrom load up the SPL stage) and then continue with different boot methods (MMC, SPI, etc.) from SPL. This adds the config option needed to control the availabily of the 'return to bootrom' boot-method separately for the TPL stage. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- common/spl/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index ee767b7d18..dd94801bb1 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -698,6 +698,17 @@ config TPL if TPL +config TPL_BOOTROM_SUPPORT + bool "Support returning to the BOOTROM (from TPL)" + help + Some platforms (e.g. the Rockchip RK3368) provide support in their + ROM for loading the next boot-stage after performing basic setup + from the TPL stage. + + Enable this option, to return to the BOOTROM through the + BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the + boot device list, if not implemented for a given board) + config TPL_ENV_SUPPORT bool "Support an environment" help -- cgit v1.2.3 From ae2cee2e34a9a4b69b7a4dea3dc93c4d93d93b53 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 28 Jul 2017 11:06:03 +0200 Subject: spl: use TPL_SYS_MALLOC_F_LEN for TPL The (upstream) changes to break up SYS_MALLOC_F_LEN for the full U-Boot and the SPL stage, break TPL (if simple malloc is enabled in TPL). This adds support for a TPL-variant of SYS_MALLOC_F_LEN: - adds TPL_SYS_MALLOC_F_LEN - rewrites a test for CONFIG_SPL_SYS_MALLOC_F_LEN to access CONFIG_VAL(SYS_MALLOC_F_LEN) Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/spl/spl.c b/common/spl/spl.c index c56cc6f0ec..bdb681f4f6 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -486,7 +486,7 @@ ulong spl_relocate_stack_gd(void) gd_t *new_gd; ulong ptr = CONFIG_SPL_STACK_R_ADDR; -#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_SPL_SYS_MALLOC_F_LEN +#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_VAL(SYS_MALLOC_F_LEN) if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) { ptr -= CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN; gd->malloc_base = ptr; -- cgit v1.2.3 From 616bd09e79d7179cdc601d6c71ae1924ed2207c4 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 28 Jul 2017 17:03:03 +0200 Subject: spl: dm: Kconfig: fix help text for SPL/TPL confusion TPL_NAND_SUPPORT, TPL_SERIAL_SUPPORT, TPL_SPI_FLASH_SUPPORT and TPL_SPI_SUPPORT refer to SPL in their help text. This fixes up the description to correctly reference TPL. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- common/spl/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index dd94801bb1..8ce9c39e35 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -717,7 +717,7 @@ config TPL_ENV_SUPPORT config TPL_I2C_SUPPORT bool "Support I2C" help - Enable support for the I2C bus in SPL. See SPL_I2C_SUPPORT for + Enable support for the I2C bus in TPL. See SPL_I2C_SUPPORT for details. config TPL_LIBCOMMON_SUPPORT @@ -747,24 +747,24 @@ config TPL_MMC_SUPPORT config TPL_NAND_SUPPORT bool "Support NAND flash" help - Enable support for NAND in SPL. See SPL_NAND_SUPPORT for details. + Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details. config TPL_SERIAL_SUPPORT bool "Support serial" help - Enable support for serial in SPL. See SPL_SERIAL_SUPPORT for + Enable support for serial in TPL. See SPL_SERIAL_SUPPORT for details. config TPL_SPI_FLASH_SUPPORT bool "Support SPI flash drivers" help - Enable support for using SPI flash in SPL. See SPL_SPI_FLASH_SUPPORT + Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT for details. config TPL_SPI_SUPPORT bool "Support SPI drivers" help - Enable support for using SPI in SPL. See SPL_SPI_SUPPORT for + Enable support for using SPI in TPL. See SPL_SPI_SUPPORT for details. endif # TPL -- cgit v1.2.3 From f1c6e1922eb57f4a212c09709801a1cc7920ffa9 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 30 Jun 2017 19:02:53 +0200 Subject: spl: dm: use CONFIG_IS_ENABLED to test for the DM option Even though there's now a TPL_DM configuration option, the spl logic still checks for SPL_DM and thus does not pick up the proper config option. This introduces the use of CONFIG_IS_ENABLED(DM) in spl.c to always pick up the desired configuration option instead of having a hard-coded check for the SPL variant. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- common/spl/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/spl/spl.c b/common/spl/spl.c index bdb681f4f6..d245cfc0d1 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -6,6 +6,7 @@ * * SPDX-License-Identifier: GPL-2.0+ */ + #include #include #include @@ -243,7 +244,7 @@ static int spl_common_init(bool setup_malloc) return ret; } } - if (IS_ENABLED(CONFIG_SPL_DM)) { + if (CONFIG_IS_ENABLED(DM)) { bootstage_start(BOOTSTATE_ID_ACCUM_DM_SPL, "dm_spl"); /* With CONFIG_SPL_OF_PLATDATA, bring in all devices */ ret = dm_init_and_scan(!CONFIG_IS_ENABLED(OF_PLATDATA)); @@ -424,7 +425,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) gd->malloc_ptr / 1024); #endif - if (IS_ENABLED(CONFIG_SPL_ATF_SUPPORT)) { + if (CONFIG_IS_ENABLED(ATF_SUPPORT)) { debug("loaded - jumping to U-Boot via ATF BL31.\n"); bl31_entry(); } -- cgit v1.2.3 From d60b5f74fd228baa40f8eb46e1e66cafc643b59c Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 30 Jun 2017 18:57:25 +0200 Subject: spl: Kconfig: split SYS_MALLOC_SIMPLE for TPL and SPL As include/malloc.h already checks for SYS_MALLOC_SIMPLE using the CONFIG_IS_ENABLED macro, we need to move to having separate entries as we switch to fully separate configuration for SPL and TPL. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- common/spl/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 8ce9c39e35..ad7747ebfc 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -62,6 +62,15 @@ config SPL_SYS_MALLOC_SIMPLE this will make the SPL binary smaller at the cost of more heap usage as the *_simple malloc functions do not re-use free-ed mem. +config TPL_SYS_MALLOC_SIMPLE + bool + prompt "Only use malloc_simple functions in the TPL" + help + Say Y here to only use the *_simple malloc functions from + malloc_simple.c, rather then using the versions from dlmalloc.c; + this will make the TPL binary smaller at the cost of more heap + usage as the *_simple malloc functions do not re-use free-ed mem. + config SPL_STACK_R bool "Enable SDRAM location for SPL stack" help -- cgit v1.2.3 From f94e643ef90566759fe164460201f8a0f9ad1777 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Tue, 4 Jul 2017 11:16:47 +0200 Subject: spl: consistently use $(SPL_TPL_) to select features for SPL and TPL builds To allow for a finer-grained control of features for TPL and SPL builds all modules/boot-methods/etc. need to be consistently selected based on the $(SPL_TPL_) macros. This allows splitting the associated config-options in Kconfig: we don't split the Kconfig options here and now, as this should happen on an as-needed basis, whenever someone needs a feature/boot-method/etc. in their TPL. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- common/Makefile | 10 +++++----- common/spl/Makefile | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'common') diff --git a/common/Makefile b/common/Makefile index 60681c845c..3ee7a6b18b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -53,7 +53,7 @@ obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o obj-$(CONFIG_CMD_BEDBUG) += bedbug.o -obj-$(CONFIG_$(SPL_)OF_LIBFDT) += fdt_support.o +obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o obj-$(CONFIG_MII) += miiphyutil.o obj-$(CONFIG_CMD_MII) += miiphyutil.o @@ -96,7 +96,7 @@ obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o -obj-$(CONFIG_SPL_OF_LIBFDT) += fdt_support.o +obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o ifdef CONFIG_SPL_USB_HOST_SUPPORT obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o obj-$(CONFIG_USB_STORAGE) += usb_storage.o @@ -146,10 +146,10 @@ endif endif obj-y += image.o obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o -obj-$(CONFIG_$(SPL_)OF_LIBFDT) += image-fdt.o -obj-$(CONFIG_$(SPL_)FIT) += image-fit.o +obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o +obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o obj-$(CONFIG_FIT_EMBED) += boot_fit.o common_fit.o -obj-$(CONFIG_$(SPL_)FIT_SIGNATURE) += image-sig.o +obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-sig.o obj-$(CONFIG_IO_TRACE) += iotrace.o obj-y += memsize.o obj-y += stdio.o diff --git a/common/spl/Makefile b/common/spl/Makefile index 189b2727d3..112b3e6022 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -10,24 +10,24 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_FRAMEWORK) += spl.o -obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_bootrom.o -obj-$(CONFIG_SPL_LOAD_FIT) += spl_fit.o -obj-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o -obj-$(CONFIG_SPL_XIP_SUPPORT) += spl_xip.o -obj-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o +obj-$(CONFIG_$(SPL_TPL_)BOOTROM_SUPPORT) += spl_bootrom.o +obj-$(CONFIG_$(SPL_TPL_)LOAD_FIT) += spl_fit.o +obj-$(CONFIG_$(SPL_TPL_)SPL_NOR_SUPPORT) += spl_nor.o +obj-$(CONFIG_$(SPL_TPL_)SPL_XIP_SUPPORT) += spl_xip.o +obj-$(CONFIG_$(SPL_TPL_)SPL_YMODEM_SUPPORT) += spl_ymodem.o ifndef CONFIG_SPL_UBI -obj-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o -obj-$(CONFIG_SPL_ONENAND_SUPPORT) += spl_onenand.o +obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += spl_nand.o +obj-$(CONFIG_$(SPL_TPL_)ONENAND_SUPPORT) += spl_onenand.o endif -obj-$(CONFIG_SPL_UBI) += spl_ubi.o -obj-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o -obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o -obj-$(CONFIG_SPL_ATF_SUPPORT) += spl_atf.o -obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o -obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o -obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o -obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o -obj-$(CONFIG_SPL_DFU_SUPPORT) += spl_dfu.o -obj-$(CONFIG_SPL_SPI_LOAD) += spl_spi.o -obj-$(CONFIG_SPL_RAM_SUPPORT) += spl_ram.o +obj-$(CONFIG_$(SPL_TPL_)UBI) += spl_ubi.o +obj-$(CONFIG_$(SPL_TPL_)NET_SUPPORT) += spl_net.o +obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += spl_mmc.o +obj-$(CONFIG_$(SPL_TPL_)ATF_SUPPORT) += spl_atf.o +obj-$(CONFIG_$(SPL_TPL_)USB_SUPPORT) += spl_usb.o +obj-$(CONFIG_$(SPL_TPL_)FAT_SUPPORT) += spl_fat.o +obj-$(CONFIG_$(SPL_TPL_)EXT_SUPPORT) += spl_ext.o +obj-$(CONFIG_$(SPL_TPL_)SATA_SUPPORT) += spl_sata.o +obj-$(CONFIG_$(SPL_TPL_)DFU_SUPPORT) += spl_dfu.o +obj-$(CONFIG_$(SPL_TPL_)SPI_LOAD) += spl_spi.o +obj-$(CONFIG_$(SPL_TPL_)RAM_SUPPORT) += spl_ram.o endif -- cgit v1.2.3 From c3916e7bdb66e6ad0847e5d1cdbef65907ad0a4d Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Tue, 4 Jul 2017 14:27:02 +0200 Subject: spl: add TPL_DRIVER_MISC_SUPPORT option This adds the TPL_DRIVER_MISC_SUPPORT option to allow activation of DRIVER_MISC_SUPPORT for devices that need it in the TPL stage. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- common/spl/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index ad7747ebfc..64f9e1fd4e 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -718,6 +718,14 @@ config TPL_BOOTROM_SUPPORT BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the boot device list, if not implemented for a given board) +config TPL_DRIVERS_MISC_SUPPORT + bool "Support misc drivers in TPL" + help + Enable miscellaneous drivers in TPL. These drivers perform various + tasks that don't fall nicely into other categories, Enable this + option to build the drivers in drivers/misc as part of an TPL + build, for those that support building in TPL (not all drivers do). + config TPL_ENV_SUPPORT bool "Support an environment" help -- cgit v1.2.3 From dd6fbcb9381f6ce0b683bc16ee18da8008c1a558 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 28 Jul 2017 19:20:49 +0200 Subject: spl: Kconfig: migrate $(SPL_TPL_)LDSCRIPT to Kconfig Now that we have split up SPL_LDSCRIPT into a SPL and TPL variant and have started to use the TPL-variant for the RK3368, it's time to clean up behind ourselves: move both variants into Kconfig and remove them from the whitelist. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- common/spl/Kconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 64f9e1fd4e..3342c04aa5 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -18,6 +18,16 @@ config SPL if SPL +config SPL_LDSCRIPT + string "Linker script for the SPL stage" + default "arch/$(ARCH)/cpu/u-boot-spl.lds" + depends on SPL + help + The SPL stage will usually require a different linker-script + (as it runs from a different memory region) than the regular + U-Boot stage. Set this to the path of the linker-script to + be used for SPL. + config SPL_BOARD_INIT bool "Call board-specific initialization in SPL" help @@ -707,6 +717,15 @@ config TPL if TPL +config TPL_LDSCRIPT + string "Linker script for the TPL stage" + depends on TPL + help + The TPL stage will usually require a different linker-script + (as it runs from a different memory region) than the regular + U-Boot stage. Set this to the path of the linker-script to + be used for TPL. + config TPL_BOOTROM_SUPPORT bool "Support returning to the BOOTROM (from TPL)" help -- cgit v1.2.3 From b3ed6ce7808e8771fb1bca67b0276a8ad6bf1702 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 28 Jul 2017 20:02:34 +0200 Subject: spl: support TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE via Kconfig Let's clean up behind ourselves and move the (newly defined) TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE into Kconfig. Given that 0x0 might be considered to be valid values for TPL_TEXT_BASE and TPL_STACK, we need to introduce helper config options ("TPL_NEEDS_SEPARATE_...") to indicate that these symbols are used (and not inherited from their SPL variants) for any given target-platform. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- common/spl/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 3342c04aa5..1a90588492 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -726,6 +726,45 @@ config TPL_LDSCRIPT U-Boot stage. Set this to the path of the linker-script to be used for TPL. + May be left empty to trigger the Makefile infrastructure to + fall back to the linker-script used for the SPL stage. + +config TPL_NEEDS_SEPARATE_TEXT_BASE + bool "TPL needs a separate text-base" + default n + depends on TPL + help + Enable, if the TPL stage should not inherit its text-base + from the SPL stage. When enabled, a base address for the + .text sections of the TPL stage has to be set below. + +config TPL_NEEDS_SEPARATE_STACK + bool "TPL needs a separate initial stack-pointer" + default n + depends on TPL + help + Enable, if the TPL stage should not inherit its initial + stack-pointer from the settings for the SPL stage. + +config TPL_TEXT_BASE + hex "Base address for the .text section of the TPL stage" + depends on TPL_NEEDS_SEPARATE_TEXT_BASE + help + The base address for the .text section of the TPL stage. + +config TPL_MAX_SIZE + int "Maximum size (in bytes) for the TPL stage" + depends on TPL + help + The maximum size (in bytes) of the TPL stage. + +config TPL_STACK + hex "Address of the initial stack-pointer for the TPL stage" + depends on TPL_NEEDS_SEPARATE_STACK + help + The address of the initial stack-pointer for the TPL stage. + Usually this will be the (aligned) top-of-stack. + config TPL_BOOTROM_SUPPORT bool "Support returning to the BOOTROM (from TPL)" help -- cgit v1.2.3 From 5aa49af3114972f62eb02ef0a6a2f0269c937f2d Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 28 Jul 2017 20:20:41 +0200 Subject: moveconfig: migrate TPL_STACK, TPL_TEXT_BASE and TPL_MAX_SIZE We can finally drop TPL_STACK, TPL_TEXT_BASE and TPL_MAX_SIZE off the whitelist (this time it's really happening!) and migrate the setting (only used on the RK3368-uQ7 so far) into Kconfig. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- common/spl/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 1a90588492..192f7f66dd 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -754,6 +754,7 @@ config TPL_TEXT_BASE config TPL_MAX_SIZE int "Maximum size (in bytes) for the TPL stage" + default 0 depends on TPL help The maximum size (in bytes) of the TPL stage. -- cgit v1.2.3 From e9e5d9d29f747d7c14944129ce523d9d5efe9c0b Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 28 Jul 2017 17:38:42 +0200 Subject: dm: timer: normalise SPL and TPL support To fully support DM timer in SPL and TPL, we need a few things cleaned up and normalised: - inclusion of the uclass and drivers should be an all-or-nothing decision for each stage and under control of $(SPL_TPL_)TIMER instead of having the two-level configuration with TIMER and $(SPL_TPL_)TIMER_SUPPORT - when $(SPL_TPL_)TIMER is enabled, the ARMv8 generic timer code can not be compiled in This normalises configuration to $(SPL_TPL_)TIMER and moves the config options to drivers/timer/Kconfig (and cleans up the collateral damage to some defconfigs that had SPL_TIMER_SUPPORT enabled). Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- common/spl/Kconfig | 8 -------- 1 file changed, 8 deletions(-) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 192f7f66dd..5176857506 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -603,14 +603,6 @@ config SPL_SPI_SUPPORT enable SPI drivers that are needed for other purposes also, such as a SPI PMIC. -config SPL_TIMER_SUPPORT - bool "Support timer drivers" - help - Enable support for timer drivers in SPL. These can be used to get - a timer value when in SPL, or perhaps for implementing a delay - function. This enables the drivers in drivers/timer as part of an - SPL build. - config SPL_USB_HOST_SUPPORT bool "Support USB host drivers" help -- cgit v1.2.3