]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
drivers/serial: Move conditional compilation to Makefile for CONFIG_* macros
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 2 Aug 2008 21:48:30 +0000 (23:48 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 3 Aug 2008 00:24:52 +0000 (02:24 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
drivers/serial/Makefile
drivers/serial/atmel_usart.c
drivers/serial/mcfuart.c
drivers/serial/s3c4510b_uart.c
drivers/serial/serial_max3100.c
drivers/serial/serial_xuartlite.c
drivers/serial/usbtty.c

index c9e797e8c0c0b8f1b24a1abab3057cd12cac9fa6..de6fbab740c32346c67e2cada2bc00c45631376f 100644 (file)
@@ -25,18 +25,18 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libserial.a
 
-COBJS-y += atmel_usart.o
-COBJS-y += mcfuart.o
+COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
+COBJS-$(CONFIG_MCFUART) += mcfuart.o
 COBJS-y += ns9750_serial.o
 COBJS-y += ns16550.o
-COBJS-y += s3c4510b_uart.o
+COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-y += serial.o
-COBJS-y += serial_max3100.o
+COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-y += serial_pl010.o
 COBJS-y += serial_pl011.o
-COBJS-y += serial_xuartlite.o
+COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
 COBJS-y += serial_sh.o
-COBJS-y += usbtty.o
+COBJS-$(CONFIG_USB_TTY) += usbtty.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index f35b99730f786528de863802191a1f11e2cd3846..f3b146c22d783ae2eb8b2bab77499c38dfc16850 100644 (file)
@@ -17,7 +17,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_ATMEL_USART
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/memory-map.h>
@@ -96,5 +95,3 @@ int serial_tstc(void)
 {
        return (usart3_readl(CSR) & USART3_BIT(RXRDY)) != 0;
 }
-
-#endif /* CONFIG_ATMEL_USART */
index 5eb4f458f815e0a966ea8c8b1bd892c7241bbc13..a1fcd057a46fb41037488025fa0b46819c6d0cc0 100644 (file)
@@ -29,8 +29,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_MCFUART
-
 #include <asm/immap.h>
 #include <asm/uart.h>
 
@@ -130,4 +128,3 @@ void serial_setbrg(void)
 
        uart->ucr = UART_UCR_RX_ENABLED | UART_UCR_TX_ENABLED;
 }
-#endif                         /* CONFIG_MCFUART */
index ddcd591f84a3b0bd08c12bf890cf89b750d850d5..aa378e1ac1e33c278fbd151bb3702ca00330459b 100644 (file)
@@ -45,8 +45,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_DRIVER_S3C4510_UART
-
 #include <asm/hardware.h>
 #include "s3c4510b_uart.h"
 
@@ -212,5 +210,3 @@ void serial_puts (const char *s)
        uart->m_ctrl.bf.sendBreak = 0;
 
 }
-
-#endif
index 0611fc1dd41f5088e248bc808663e9214adf715b..4abc27109b4afe58f25262a93f4e43234cb93829 100644 (file)
@@ -26,8 +26,6 @@
 #include <common.h>
 #include <watchdog.h>
 
-#ifdef CONFIG_MAX3100_SERIAL
-
 DECLARE_GLOBAL_DATA_PTR;
 
 /**************************************************************/
@@ -298,5 +296,3 @@ int serial_tstc(void)
 void serial_setbrg(void)
 {
 }
-
-#endif
index 74546ce84688f52f3dad612d5a0987de03daec38..00d0eaac753ed19678fb812a99fc4c1a258c2809 100644 (file)
@@ -27,8 +27,6 @@
 #include <config.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_XILINX_UARTLITE
-
 #define RX_FIFO_OFFSET         0 /* receive FIFO, read only */
 #define TX_FIFO_OFFSET         4 /* transmit FIFO, write only */
 #define STATUS_REG_OFFSET      8 /* status register, read only */
@@ -77,5 +75,3 @@ int serial_tstc(void)
 {
        return (in_be32((u32 *) UARTLITE_STATUS) & SR_RX_FIFO_VALID_DATA);
 }
-
-#endif /* CONFIG_MICROBLZE */
index 2bc5c3c83873188fd3f5e0d1b8600b65c36711cb..e738c5627140f2855fdd14e127988d8004b21082 100644 (file)
@@ -23,8 +23,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_USB_TTY
-
 #include <circbuf.h>
 #include <devices.h>
 #include "usbtty.h"
@@ -1007,6 +1005,3 @@ void usbtty_poll (void)
        udc_irq();
 
 }
-
-
-#endif