
Kim Phillips wrote:
diff --git a/include/ns16550.h b/include/ns16550.h index e6ade61..dbaacfc 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -154,6 +154,12 @@ typedef volatile struct NS16550 *NS16550_t;
void NS16550_init (NS16550_t com_port, int baud_divisor); void NS16550_putc (NS16550_t com_port, char c); +#ifndef CONFIG_SYS_NS16550_MIN_FUNCTIONS char NS16550_getc (NS16550_t com_port); int NS16550_tstc (NS16550_t com_port); void NS16550_reinit (NS16550_t com_port, int baud_divisor); +#else +#define NS16550_getc(com_port) 0 +#define NS16550_tstc(com_port) 0 +#define NS16550_reinit(com_port, baud_divisor) +#endif
I think it would be better to get the error than to silently nop these functions out. The point is to eliminate them when they're not used at all, such as in the AND bootstrap.
Plus, the above definitions could cause unused variable warnings if nothing else consumes the arguments to the macros.
-Scott