[U-Boot-Users] [PATCH 04/11] serial: Clean drivers/serial/Makefile

monstr at seznam.cz
2008-07-14T17:45:38Z

From: Michal Simek <monstr@monstr.eu>

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
drivers/serial/Makefile | 24 ++++++++++++------------
drivers/serial/atmel_usart.c | 3 ---
drivers/serial/mcfuart.c | 3 ---
drivers/serial/ns16550.c | 4 ----
drivers/serial/ns9750_serial.c | 4 ----
drivers/serial/s3c4510b_uart.c | 4 ----
drivers/serial/serial.c | 4 ----
drivers/serial/serial_max3100.c | 4 ----
drivers/serial/serial_pl010.c | 4 ----
drivers/serial/serial_pl011.c | 4 ----
drivers/serial/serial_sh.c | 4 ----
drivers/serial/serial_xuartlite.c | 4 ----
drivers/serial/usbtty.c | 5 -----
13 files changed, 12 insertions(+), 59 deletions(-)

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index c9e797e..45dfe96 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -25,18 +25,18 @@ include $(TOPDIR)/config.mk

LIB := $(obj)libserial.a

-COBJS-y += atmel_usart.o
-COBJS-y += mcfuart.o
-COBJS-y += ns9750_serial.o
-COBJS-y += ns16550.o
-COBJS-y += s3c4510b_uart.o
-COBJS-y += serial.o
-COBJS-y += serial_max3100.o
-COBJS-y += serial_pl010.o
-COBJS-y += serial_pl011.o
-COBJS-y += serial_xuartlite.o
-COBJS-y += serial_sh.o
-COBJS-y += usbtty.o
+COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
+COBJS-$(CONFIG_MCFUART) += mcfuart.o
+COBJS-$(CFG_NS9750_UART) += ns9750_serial.o
+COBJS-$(CFG_NS16550) += ns16550.o
+COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
+COBJS-$(CFG_NS16550_SERIAL) += serial.o
+COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
+COBJS-$(CFG_PL010_SERIAL) += serial_pl010.o
+COBJS-$(CFG_PL011_SERIAL) += serial_pl011.o
+COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
+COBJS-$(CFG_SCIF_CONSOLE) += serial_sh.o
+COBJS-$(CONFIG_USB_TTY) += usbtty.o

COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index f35b997..f3b146c 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -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 */
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
index 5eb4f45..a1fcd05 100644
--- a/drivers/serial/mcfuart.c
+++ b/drivers/serial/mcfuart.c
@@ -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 */
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 6b3f60e..af717e0 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -6,8 +6,6 @@

#include <config.h>

-#ifdef CFG_NS16550
-
#include <ns16550.h>

#define LCRVAL LCR_8N1 /* 8 data, 1 stop, no parity */
@@ -75,5 +73,3 @@ int NS16550_tstc (NS16550_t com_port)
{
return ((com_port->lsr & LSR_DR) != 0);
}
-
-#endif
diff --git a/drivers/serial/ns9750_serial.c b/drivers/serial/ns9750_serial.c
index 02c0d39..e9645a0 100644
--- a/drivers/serial/ns9750_serial.c
+++ b/drivers/serial/ns9750_serial.c
@@ -28,8 +28,6 @@

#include <common.h>

-#ifdef CFG_NS9750_UART
-
#include "ns9750_bbus.h" /* for GPIOs */
#include "ns9750_ser.h" /* for serial configuration */

@@ -210,5 +208,3 @@ static unsigned int calcRxCharGapRegister( void )
{
return NS9750_SER_RX_CHAR_TIMER_TRUN;
}
-
-#endif /* CFG_NS9750_UART */
diff --git a/drivers/serial/s3c4510b_uart.c b/drivers/serial/s3c4510b_uart.c
index ddcd591..aa378e1 100644
--- a/drivers/serial/s3c4510b_uart.c
+++ b/drivers/serial/s3c4510b_uart.c
@@ -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
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 4ccaee2..77a0ba5 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -23,8 +23,6 @@

#include <common.h>

-#ifdef CFG_NS16550_SERIAL
-
#include <ns16550.h>
#ifdef CFG_NS87308
#include <ns87308.h>
@@ -334,5 +332,3 @@ DECLARE_ESERIAL_FUNCTIONS(4);
struct serial_device eserial4_device =
INIT_ESERIAL_STRUCTURE(4,"eserial3","EUART4");
#endif /* CONFIG_SERIAL_MULTI */
-
-#endif
diff --git a/drivers/serial/serial_max3100.c b/drivers/serial/serial_max3100.c
index 0611fc1..4abc271 100644
--- a/drivers/serial/serial_max3100.c
+++ b/drivers/serial/serial_max3100.c
@@ -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
diff --git a/drivers/serial/serial_pl010.c b/drivers/serial/serial_pl010.c
index 134ed09..436d6e0 100644
--- a/drivers/serial/serial_pl010.c
+++ b/drivers/serial/serial_pl010.c
@@ -31,8 +31,6 @@
#include <common.h>
#include <watchdog.h>

-#ifdef CFG_PL010_SERIAL
-
#include "serial_pl011.h"

#define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
@@ -171,5 +169,3 @@ static int pl010_tstc (int portnum)
return !(IO_READ (port[portnum] + UART_PL01x_FR) &
UART_PL01x_FR_RXFE);
}
-
-#endif
diff --git a/drivers/serial/serial_pl011.c b/drivers/serial/serial_pl011.c
index 4d35fe5..b8d394c 100644
--- a/drivers/serial/serial_pl011.c
+++ b/drivers/serial/serial_pl011.c
@@ -30,8 +30,6 @@

#include <common.h>

-#ifdef CFG_PL011_SERIAL
-
#include "serial_pl011.h"

#define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
@@ -157,5 +155,3 @@ static int pl011_tstc (int portnum)
return !(IO_READ (port[portnum] + UART_PL01x_FR) &
UART_PL01x_FR_RXFE);
}
-
-#endif
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 0801ac4..2b9eeed 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -20,8 +20,6 @@
#include <common.h>
#include <asm/processor.h>

-#ifdef CFG_SCIF_CONSOLE
-
#if defined (CONFIG_CONS_SCIF0)
#define SCIF_BASE SCIF0_BASE
#elif defined (CONFIG_CONS_SCIF1)
@@ -215,5 +213,3 @@ int serial_getc(void)

return ch;
}
-
-#endif /* CFG_SCIF_CONSOLE */
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 5c41a1c..7e84aa1 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -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(UARTLITE_STATUS) & SR_RX_FIFO_VALID_DATA);
}
-
-#endif /* CONFIG_MICROBLZE */
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index cc2bdac..846d12e 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -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
--
1.5.4.GIT