On 09/29/2012 11:52 PM, Marek Vasut wrote:
This serial driver had wrong name of the source file for some time
now. The name of the driver was serial.c instead of any more logical
and fitting name. Thus, rename the driver source file to serial_ns16550.c
and be done with it.
Signed-off-by: Marek Vasut ma...@denx.de
Cc: Marek Vasut marek.va...@gmail.com
Cc: Tom Rini tr...@ti.com
Cc: Anatolij Gustschin ag...@denx.de
Cc: Stefan Roese s...@denx.de
Cc: Mike Frysinger vap...@gentoo.org
Cc: Michal Simek mon...@monstr.eu
---
drivers/serial/Makefile |2 +-
drivers/serial/serial.c | 359 ---
drivers/serial/serial_ns16550.c | 359 +++
3 files changed, 360 insertions(+), 360 deletions(-)
delete mode 100644 drivers/serial/serial.c
create mode 100644 drivers/serial/serial_ns16550.c
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 65d0f23..d93e81b 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -37,7 +37,7 @@ COBJS-$(CONFIG_SYS_NS16550) += ns16550.o
COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
COBJS-$(CONFIG_S5P) += serial_s5p.o
-COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
+COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial_ns16550.o
COBJS-$(CONFIG_CLPS7111_SERIAL) += serial_clps7111.o
COBJS-$(CONFIG_IMX_SERIAL) += serial_imx.o
COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
deleted file mode 100644
index 00ad97c..000
--- a/drivers/serial/serial.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * (C) Copyright 2000
- * Rob Taylor, Flying Pig Systems. r...@flyingpig.com.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include common.h
-#include linux/compiler.h
-
-#include ns16550.h
-#ifdef CONFIG_NS87308
-#include ns87308.h
-#endif
-
-#if defined (CONFIG_SERIAL_MULTI)
-#include serial.h
-#endif
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#if !defined(CONFIG_CONS_INDEX)
-#if defined (CONFIG_SERIAL_MULTI)
-/* with CONFIG_SERIAL_MULTI we might have no console
- * on these devices
- */
-#else
-#error No console index specified.
-#endif /* CONFIG_SERIAL_MULTI */
-#elif (CONFIG_CONS_INDEX 1) || (CONFIG_CONS_INDEX 4)
-#error Invalid console index value.
-#endif
-
-#if CONFIG_CONS_INDEX == 1 !defined(CONFIG_SYS_NS16550_COM1)
-#error Console port 1 defined but not configured.
-#elif CONFIG_CONS_INDEX == 2 !defined(CONFIG_SYS_NS16550_COM2)
-#error Console port 2 defined but not configured.
-#elif CONFIG_CONS_INDEX == 3 !defined(CONFIG_SYS_NS16550_COM3)
-#error Console port 3 defined but not configured.
-#elif CONFIG_CONS_INDEX == 4 !defined(CONFIG_SYS_NS16550_COM4)
-#error Console port 4 defined but not configured.
-#endif
-
-/* Note: The port number specified in the functions is 1 based.
- * the array is 0 based.
- */
-static NS16550_t serial_ports[4] = {
-#ifdef CONFIG_SYS_NS16550_COM1
- (NS16550_t)CONFIG_SYS_NS16550_COM1,
-#else
- NULL,
-#endif
-#ifdef CONFIG_SYS_NS16550_COM2
- (NS16550_t)CONFIG_SYS_NS16550_COM2,
-#else
- NULL,
-#endif
-#ifdef CONFIG_SYS_NS16550_COM3
- (NS16550_t)CONFIG_SYS_NS16550_COM3,
-#else
- NULL,
-#endif
-#ifdef CONFIG_SYS_NS16550_COM4
- (NS16550_t)CONFIG_SYS_NS16550_COM4
-#else
- NULL
-#endif
-};
-
-#define PORT serial_ports[port-1]
-
-#if defined(CONFIG_SERIAL_MULTI)
-
-/* Multi serial device functions */
-#define DECLARE_ESERIAL_FUNCTIONS(port) \
-int eserial##port##_init (void) {\
- int clock_divisor; \
- clock_divisor = calc_divisor(serial_ports[port-1]); \
- NS16550_init(serial_ports[port-1], clock_divisor); \
- return(0);}\
-void eserial##port##_setbrg (void) {\
- serial_setbrg_dev(port);}\
-int eserial##port##_getc (void) {\
- return serial_getc_dev(port);}\
-int eserial##port##_tstc (void) {\
- return serial_tstc_dev(port);}\
-void eserial##port##_putc (const char c) {\
- serial_putc_dev(port, c);}\
-void eserial##port##_puts (const char *s) {\
- serial_puts_dev(port, s);}
-
-/* Serial device descriptor */
-#define INIT_ESERIAL_STRUCTURE(port, __name) { \
-