aboutsummaryrefslogtreecommitdiff
path: root/include/config_fallbacks.h
diff options
context:
space:
mode:
authorBenoît Thébaudeau2013-04-11 09:35:49 +0000
committerAlbert ARIBAUD2013-04-12 07:55:06 +0200
commit6113d3f27ca1414c98ffee90ed8f287898b73322 (patch)
treeaf884c12ea9e3c805b8e8b140bcdc866f992248f /include/config_fallbacks.h
parent2979b263239b37ce1fddd0ad1b1c2ad096dbd120 (diff)
Makefile: Change CONFIG_SPL_PAD_TO to image offset
Change CONFIG_SPL_PAD_TO from a link address to an image offset since this is more handy and closer to the purpose of this config. Automatically define CONFIG_SPL_PAD_TO to CONFIG_SPL_MAX_SIZE (or 0 without CONFIG_SPL_MAX_SIZE). Test that CONFIG_SPL_PAD_TO >= CONFIG_SPL_MAX_SIZE if CONFIG_SPL_PAD_TO is non-zero. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Diffstat (limited to 'include/config_fallbacks.h')
-rw-r--r--include/config_fallbacks.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index 9298d0ee970..e59ee963f71 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -9,6 +9,22 @@
#ifndef __CONFIG_FALLBACKS_H
#define __CONFIG_FALLBACKS_H
+#ifdef CONFIG_SPL
+#ifdef CONFIG_SPL_PAD_TO
+#ifdef CONFIG_SPL_MAX_SIZE
+#if CONFIG_SPL_PAD_TO && CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
+#error CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
+#endif
+#endif
+#else
+#ifdef CONFIG_SPL_MAX_SIZE
+#define CONFIG_SPL_PAD_TO CONFIG_SPL_MAX_SIZE
+#else
+#define CONFIG_SPL_PAD_TO 0
+#endif
+#endif
+#endif
+
#ifndef CONFIG_SYS_BAUDRATE_TABLE
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
#endif