[U-Boot] [PATCH v2] drivers/serial/ns16550: move ifdef into Makefile COBJS-$(...)

Mike Frysinger vapier at gentoo.org
Thu Feb 12 02:26:52 CET 2009


Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
v2
	- rebased against master

 drivers/serial/Makefile  |    4 ++--
 drivers/serial/ns16550.c |    5 -----
 drivers/serial/serial.c  |    4 ----
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index b6fd0d7..0f980ab 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -28,10 +28,10 @@ LIB	:= $(obj)libserial.a
 COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
 COBJS-$(CONFIG_MCFUART) += mcfuart.o
 COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
-COBJS-y += ns16550.o
+COBJS-$(CONFIG_SYS_NS16550) += ns16550.o
 COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
-COBJS-y += serial.o
+COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
 COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 93c2243..a9391c7 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -5,9 +5,6 @@
  */
 
 #include <config.h>
-
-#ifdef CONFIG_SYS_NS16550
-
 #include <ns16550.h>
 
 #define LCRVAL LCR_8N1					/* 8 data, 1 stop, no parity */
@@ -75,5 +72,3 @@ int NS16550_tstc (NS16550_t com_port)
 {
 	return ((com_port->lsr & LSR_DR) != 0);
 }
-
-#endif
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index bce7548..966df9a 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -23,8 +23,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_SYS_NS16550_SERIAL
-
 #include <ns16550.h>
 #ifdef CONFIG_NS87308
 #include <ns87308.h>
@@ -328,5 +326,3 @@ DECLARE_ESERIAL_FUNCTIONS(4);
 struct serial_device eserial4_device =
 	INIT_ESERIAL_STRUCTURE(4,"eserial3","EUART4");
 #endif /* CONFIG_SERIAL_MULTI */
-
-#endif
-- 
1.6.1.2



More information about the U-Boot mailing list