summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2015-06-29 09:10:46 +0200
committerTom Rini <trini@konsulko.com>2015-08-12 20:47:13 -0400
commit80402f34f8e1f46134a0272ff4d34be64ff7380b (patch)
tree5fcf26d057c39f522fe4cf6ed77966dc322d72b8 /common
parentacb5ff021eb65931d3e970da8ff0a00dda0cd088 (diff)
downloadblackbird-obmc-uboot-80402f34f8e1f46134a0272ff4d34be64ff7380b.tar.gz
blackbird-obmc-uboot-80402f34f8e1f46134a0272ff4d34be64ff7380b.zip
spl, common, serial: build SPL without serial support
This patch enables building SPL without CONFIG_SPL_SERIAL_SUPPORT support. Signed-off-by: Heiko Schocher <hs@denx.de> [trini: Ensure we build arch/arm/imx-common on mx28] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r--common/Makefile4
-rw-r--r--common/cli_readline.c2
-rw-r--r--common/cli_simple.c2
-rw-r--r--common/image.c8
4 files changed, 12 insertions, 4 deletions
diff --git a/common/Makefile b/common/Makefile
index 6dc4c899bc..dc82433e90 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -251,7 +251,11 @@ obj-$(CONFIG_DDR_SPD) += ddr_spd.o
obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
obj-$(CONFIG_HWCONFIG) += hwconfig.o
obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_SERIAL_SUPPORT) += console.o
+else
obj-y += console.o
+endif
obj-$(CONFIG_CROS_EC) += cros_ec.o
obj-y += dlmalloc.o
ifdef CONFIG_SYS_MALLOC_F_LEN
diff --git a/common/cli_readline.c b/common/cli_readline.c
index 9a9fb35b71..c1476e42d9 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -597,7 +597,7 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer,
puts(tab_seq + (col & 07));
col += 8 - (col & 07);
} else {
- char buf[2];
+ char __maybe_unused buf[2];
/*
* Echo input using puts() to force an
diff --git a/common/cli_simple.c b/common/cli_simple.c
index 6c65cc686c..00a8d2f48b 100644
--- a/common/cli_simple.c
+++ b/common/cli_simple.c
@@ -68,7 +68,7 @@ void cli_simple_process_macros(const char *input, char *output)
/* 1 = waiting for '(' or '{' */
/* 2 = waiting for ')' or '}' */
/* 3 = waiting for ''' */
- char *output_start = output;
+ char __maybe_unused *output_start = output;
debug_parser("[PROCESS_MACROS] INPUT len %zd: \"%s\"\n", strlen(input),
input);
diff --git a/common/image.c b/common/image.c
index 9efacf8b89..c3616e2c44 100644
--- a/common/image.c
+++ b/common/image.c
@@ -54,6 +54,10 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch,
#include <u-boot/md5.h>
#include <time.h>
#include <image.h>
+
+#ifndef __maybe_unused
+# define __maybe_unused /* unimplemented */
+#endif
#endif /* !USE_HOSTCC*/
#include <u-boot/crc.h>
@@ -274,7 +278,7 @@ void image_multi_getimg(const image_header_t *hdr, ulong idx,
static void image_print_type(const image_header_t *hdr)
{
- const char *os, *arch, *type, *comp;
+ const char __maybe_unused *os, *arch, *type, *comp;
os = genimg_get_os_name(image_get_os(hdr));
arch = genimg_get_arch_name(image_get_arch(hdr));
@@ -299,7 +303,7 @@ static void image_print_type(const image_header_t *hdr)
void image_print_contents(const void *ptr)
{
const image_header_t *hdr = (const image_header_t *)ptr;
- const char *p;
+ const char __maybe_unused *p;
p = IMAGE_INDENT_STRING;
printf("%sImage Name: %.*s\n", p, IH_NMLEN, image_get_name(hdr));
OpenPOWER on IntegriCloud