summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2020-02-27 13:56:10 +0000
committerTom Rini <trini@konsulko.com>2020-04-24 10:09:59 -0400
commite13df08a2685345f12ae1ec1d99ea3f599d58360 (patch)
tree52e4328b571478f445f11b40348ab5f4a24472e5 /include
parent532de8d99c754c2e514ee4a069f5d69df644c9bc (diff)
downloadu-boot-e13df08a2685345f12ae1ec1d99ea3f599d58360.tar.gz
env: remove callback.o for an SPL build
env.h says this about about callback declarations (U_BOOT_ENV_CALLBACK): * For SPL these are silently dropped to reduce code size, since environment * callbacks are not supported with SPL. So env_callback_init() does a lot of work to not find anything in the guaranteed empty env_clbk list. Drop callback.o entirely from the link and stub out the only public function defined in callback.o. This cuts about 600 bytes from the SPL on my ppc build. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/env_callback.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/env_callback.h b/include/env_callback.h
index 74da20eec3..05e9516a0f 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -72,6 +72,12 @@
"serial#:serialno," \
CONFIG_ENV_CALLBACK_LIST_STATIC
+#ifndef CONFIG_SPL_BUILD
void env_callback_init(struct env_entry *var_entry);
+#else
+static inline void env_callback_init(struct env_entry *var_entry)
+{
+}
+#endif
#endif /* __ENV_CALLBACK_H__ */