summaryrefslogtreecommitdiff
path: root/lib/Kconfig
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:56:27 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:57:45 +0800
commit27084c03d36a7f0e4d7c1679761e81567f1d5442 (patch)
treeb4687146fd9350a6186dad016ed486589e1b1f06 /lib/Kconfig
parent535e07846af6d05eece6e51e4c7b53239d3ac8ba (diff)
spl: Allow tiny printf() to be controlled in SPL and TPL
At present there is only one control for this and it is used for both SPL and TPL. But SPL might have a lot more space than TPL so the extra cost of a full printf() might be acceptable. Split the option into two, providing separate SPL and TPL controls. The TPL setting defaults to the same as SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'lib/Kconfig')
-rw-r--r--lib/Kconfig20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 3da45a5ec32..135f0b372b0 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -40,12 +40,12 @@ config PRINTF
config SPL_PRINTF
bool
select SPL_SPRINTF
- select SPL_STRTO if !USE_TINY_PRINTF
+ select SPL_STRTO if !SPL_USE_TINY_PRINTF
config TPL_PRINTF
bool
select TPL_SPRINTF
- select TPL_STRTO if !USE_TINY_PRINTF
+ select TPL_STRTO if !TPL_USE_TINY_PRINTF
config SPRINTF
bool
@@ -95,9 +95,9 @@ config SYS_HZ
get_timer() must operate in milliseconds and this option must be
set to 1000.
-config USE_TINY_PRINTF
+config SPL_USE_TINY_PRINTF
bool "Enable tiny printf() version"
- depends on SPL || TPL
+ depends on SPL
default y
help
This option enables a tiny, stripped down printf version.
@@ -107,6 +107,18 @@ config USE_TINY_PRINTF
The supported format specifiers are %c, %s, %u/%d and %x.
+config TPL_USE_TINY_PRINTF
+ bool "Enable tiny printf() version"
+ depends on TPL
+ default y if SPL_USE_TINY_PRINTF
+ help
+ This option enables a tiny, stripped down printf version.
+ This should only be used in space limited environments,
+ like SPL versions with hard memory limits. This version
+ reduces the code size by about 2.5KiB on armv7.
+
+ The supported format specifiers are %c, %s, %u/%d and %x.
+
config PANIC_HANG
bool "Do not reset the system on fatal error"
help