diff options
author | Simon Glass <sjg@chromium.org> | 2015-02-28 05:06:32 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-23 15:05:52 (GMT) |
commit | 66312374dca86e77fc9b08f774546e62b6cd1aa7 (patch) | |
tree | 2a26f0695511a13329ca8469fcadfcf417003f79 /lib/fdtdec.c | |
parent | 7f9875e733b79556ade508b88f88ac1f8a2c7e3c (diff) | |
download | u-boot-66312374dca86e77fc9b08f774546e62b6cd1aa7.tar.xz |
dm: Add a panic_str() function to reduce code size
The printf() in panic() adds about 1.5KB of code size to SPL when compiled
with Thumb-2. Provide a smaller version that does not support printf()-style
arguments and use it in two commonly compiled places.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/fdtdec.c')
-rw-r--r-- | lib/fdtdec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 331eae2..577c60e 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -565,9 +565,11 @@ int fdtdec_prepare_fdt(void) { if (!gd->fdt_blob || ((uintptr_t)gd->fdt_blob & 3) || fdt_check_header(gd->fdt_blob)) { - printf("No valid FDT found - please append one to U-Boot " - "binary, use u-boot-dtb.bin or define " - "CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>\n"); +#ifdef CONFIG_SPL_BUILD + puts("Missing DTB\n"); +#else + puts("No valid device tree binary found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>\n"); +#endif return -1; } return 0; |