X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fserial%2Fns16550.c;h=397f5df5d60b81139852037c35c9464ba6bece27;hb=156feb90d200f186cdfd856d7f6f1878bb1bec1e;hp=6b3f60eb575c3d9eaf31f92da5a169a58167e677;hpb=ac2731f185ee4b7f56998c8f26d181f66fad84f8;p=oweals%2Fu-boot.git diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 6b3f60eb57..397f5df5d6 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -1,13 +1,10 @@ /* * COM1 NS16550 support * originally from linux source (arch/ppc/boot/ns16550.c) - * modified to use CFG_ISA_MEM and new defines + * modified to use CONFIG_SYS_ISA_MEM and new defines */ #include - -#ifdef CFG_NS16550 - #include #define LCRVAL LCR_8N1 /* 8 data, 1 stop, no parity */ @@ -36,9 +33,10 @@ void NS16550_init (NS16550_t com_port, int baud_divisor) #else com_port->mdr1 = 0; /* /16 is proper to hit 115200 with 48MHz */ #endif -#endif +#endif /* CONFIG_OMAP */ } +#ifndef CONFIG_NS16550_MIN_FUNCTIONS void NS16550_reinit (NS16550_t com_port, int baud_divisor) { com_port->ier = 0x00; @@ -53,6 +51,7 @@ void NS16550_reinit (NS16550_t com_port, int baud_divisor) com_port->dlm = (baud_divisor >> 8) & 0xff; com_port->lcr = LCRVAL; } +#endif /* CONFIG_NS16550_MIN_FUNCTIONS */ void NS16550_putc (NS16550_t com_port, char c) { @@ -60,6 +59,7 @@ void NS16550_putc (NS16550_t com_port, char c) com_port->thr = c; } +#ifndef CONFIG_NS16550_MIN_FUNCTIONS char NS16550_getc (NS16550_t com_port) { while ((com_port->lsr & LSR_DR) == 0) { @@ -76,4 +76,4 @@ int NS16550_tstc (NS16550_t com_port) return ((com_port->lsr & LSR_DR) != 0); } -#endif +#endif /* CONFIG_NS16550_MIN_FUNCTIONS */