修訂 | 6e303a57b354fdb34f94058befa0254ebbd231af (tree) |
---|---|
時間 | 2016-03-23 02:49:29 |
作者 | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
SPL: CONFIG_SPL_SERIAL_SUPPORT disabled fix.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -856,15 +856,13 @@ int tstc(void); | ||
856 | 856 | #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SERIAL_SUPPORT) |
857 | 857 | #define putc(...) do { } while (0) |
858 | 858 | #define puts(...) do { } while (0) |
859 | -#define printf(...) do { } while (0) | |
860 | -#define vprintf(...) do { } while (0) | |
861 | 859 | #else |
862 | 860 | void putc(const char c); |
863 | 861 | void puts(const char *s); |
862 | +#endif | |
864 | 863 | int printf(const char *fmt, ...) |
865 | 864 | __attribute__ ((format (__printf__, 1, 2))); |
866 | 865 | int vprintf(const char *fmt, va_list args); |
867 | -#endif | |
868 | 866 | |
869 | 867 | /* stderr */ |
870 | 868 | #define eputc(c) fputc(stderr, c) |
@@ -11,11 +11,13 @@ struct spi_slave; | ||
11 | 11 | |
12 | 12 | /* These are declarations of exported functions available in C code */ |
13 | 13 | unsigned long get_version(void); |
14 | +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_SERIAL_SUPPORT) | |
14 | 15 | int getc(void); |
15 | 16 | int tstc(void); |
16 | 17 | void putc(const char); |
17 | 18 | void puts(const char*); |
18 | 19 | int printf(const char* fmt, ...); |
20 | +#endif | |
19 | 21 | void install_hdlr(int, interrupt_handler_t, void*); |
20 | 22 | void free_hdlr(int); |
21 | 23 | void *malloc(size_t); |
@@ -24,7 +26,9 @@ void free(void*); | ||
24 | 26 | #endif |
25 | 27 | void __udelay(unsigned long); |
26 | 28 | unsigned long get_timer(unsigned long); |
29 | +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_SERIAL_SUPPORT) | |
27 | 30 | int vprintf(const char *, va_list); |
31 | +#endif | |
28 | 32 | unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base); |
29 | 33 | int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); |
30 | 34 | char *getenv (const char *name); |
@@ -83,9 +83,9 @@ obj-$(CONFIG_LIB_RAND) += rand.o | ||
83 | 83 | ifdef CONFIG_SPL_BUILD |
84 | 84 | # SPL U-Boot may use full-printf, tiny-printf or none at all |
85 | 85 | ifdef CONFIG_USE_TINY_PRINTF |
86 | -obj-$(CONFIG_SPL_SERIAL_SUPPORT) += tiny-printf.o panic.o strto.o | |
86 | +obj-y += tiny-printf.o panic.o strto.o | |
87 | 87 | else |
88 | -obj-$(CONFIG_SPL_SERIAL_SUPPORT) += vsprintf.o panic.o strto.o | |
88 | +obj-y += vsprintf.o panic.o strto.o | |
89 | 89 | endif |
90 | 90 | else |
91 | 91 | # Main U-Boot always uses the full printf support |