2007-02-14 03:35:38 +07:00
|
|
|
/*
|
|
|
|
* Serial Port driver for Open Firmware platform devices
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Arnd Bergmann <arnd@arndb.de>, IBM Corp.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
2014-11-11 14:09:05 +07:00
|
|
|
#include <linux/console.h>
|
2007-02-14 03:35:38 +07:00
|
|
|
#include <linux/module.h>
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 15:04:11 +07:00
|
|
|
#include <linux/slab.h>
|
2012-04-11 04:10:53 +07:00
|
|
|
#include <linux/delay.h>
|
2007-02-14 03:35:38 +07:00
|
|
|
#include <linux/serial_core.h>
|
2012-04-11 04:10:53 +07:00
|
|
|
#include <linux/serial_reg.h>
|
2010-08-17 12:44:49 +07:00
|
|
|
#include <linux/of_address.h>
|
2010-11-18 06:50:23 +07:00
|
|
|
#include <linux/of_irq.h>
|
2008-05-23 13:32:54 +07:00
|
|
|
#include <linux/of_platform.h>
|
2009-01-07 16:32:38 +07:00
|
|
|
#include <linux/nwpserial.h>
|
2012-10-22 22:58:01 +07:00
|
|
|
#include <linux/clk.h>
|
2007-02-14 03:35:38 +07:00
|
|
|
|
2013-03-25 20:51:15 +07:00
|
|
|
#include "8250/8250.h"
|
|
|
|
|
2007-05-31 16:33:04 +07:00
|
|
|
struct of_serial_info {
|
2012-10-22 22:58:01 +07:00
|
|
|
struct clk *clk;
|
2007-05-31 16:33:04 +07:00
|
|
|
int type;
|
|
|
|
int line;
|
|
|
|
};
|
|
|
|
|
2012-04-11 04:10:53 +07:00
|
|
|
#ifdef CONFIG_ARCH_TEGRA
|
|
|
|
void tegra_serial_handle_break(struct uart_port *p)
|
|
|
|
{
|
|
|
|
unsigned int status, tmout = 10000;
|
|
|
|
|
|
|
|
do {
|
|
|
|
status = p->serial_in(p, UART_LSR);
|
|
|
|
if (status & (UART_LSR_FIFOE | UART_LSR_BRK_ERROR_BITS))
|
|
|
|
status = p->serial_in(p, UART_RX);
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
if (--tmout == 0)
|
|
|
|
break;
|
|
|
|
udelay(1);
|
|
|
|
} while (1);
|
|
|
|
}
|
2013-02-01 02:01:53 +07:00
|
|
|
#else
|
|
|
|
static inline void tegra_serial_handle_break(struct uart_port *port)
|
|
|
|
{
|
|
|
|
}
|
2012-04-11 04:10:53 +07:00
|
|
|
#endif
|
|
|
|
|
2007-02-14 03:35:38 +07:00
|
|
|
/*
|
|
|
|
* Fill a struct uart_port for a given device node
|
|
|
|
*/
|
2012-11-20 01:21:50 +07:00
|
|
|
static int of_platform_serial_setup(struct platform_device *ofdev,
|
2012-10-22 22:58:01 +07:00
|
|
|
int type, struct uart_port *port,
|
|
|
|
struct of_serial_info *info)
|
2007-02-14 03:35:38 +07:00
|
|
|
{
|
|
|
|
struct resource resource;
|
2010-04-14 06:12:29 +07:00
|
|
|
struct device_node *np = ofdev->dev.of_node;
|
2011-07-01 01:39:12 +07:00
|
|
|
u32 clk, spd, prop;
|
|
|
|
int ret;
|
2007-02-14 03:35:38 +07:00
|
|
|
|
|
|
|
memset(port, 0, sizeof *port);
|
2011-07-01 01:39:12 +07:00
|
|
|
if (of_property_read_u32(np, "clock-frequency", &clk)) {
|
2012-10-22 22:58:01 +07:00
|
|
|
|
|
|
|
/* Get clk rate through clk driver if present */
|
|
|
|
info->clk = clk_get(&ofdev->dev, NULL);
|
2012-11-01 12:27:34 +07:00
|
|
|
if (IS_ERR(info->clk)) {
|
2012-10-22 22:58:01 +07:00
|
|
|
dev_warn(&ofdev->dev,
|
|
|
|
"clk or clock-frequency not defined\n");
|
2012-11-01 12:27:34 +07:00
|
|
|
return PTR_ERR(info->clk);
|
2012-10-22 22:58:01 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
clk_prepare_enable(info->clk);
|
|
|
|
clk = clk_get_rate(info->clk);
|
2007-02-14 03:35:38 +07:00
|
|
|
}
|
2011-07-01 01:39:12 +07:00
|
|
|
/* If current-speed was set, then try not to change it. */
|
|
|
|
if (of_property_read_u32(np, "current-speed", &spd) == 0)
|
|
|
|
port->custom_divisor = clk / (16 * spd);
|
2007-02-14 03:35:38 +07:00
|
|
|
|
|
|
|
ret = of_address_to_resource(np, 0, &resource);
|
|
|
|
if (ret) {
|
|
|
|
dev_warn(&ofdev->dev, "invalid address\n");
|
2012-10-22 22:58:01 +07:00
|
|
|
goto out;
|
2007-02-14 03:35:38 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
spin_lock_init(&port->lock);
|
|
|
|
port->mapbase = resource.start;
|
2008-04-03 06:22:19 +07:00
|
|
|
|
|
|
|
/* Check for shifted address mapping */
|
2011-07-01 01:39:12 +07:00
|
|
|
if (of_property_read_u32(np, "reg-offset", &prop) == 0)
|
|
|
|
port->mapbase += prop;
|
2008-04-03 06:22:19 +07:00
|
|
|
|
|
|
|
/* Check for registers offset within the devices address range */
|
2011-07-01 01:39:12 +07:00
|
|
|
if (of_property_read_u32(np, "reg-shift", &prop) == 0)
|
|
|
|
port->regshift = prop;
|
2008-04-03 06:22:19 +07:00
|
|
|
|
2013-03-25 18:34:45 +07:00
|
|
|
/* Check for fifo size */
|
|
|
|
if (of_property_read_u32(np, "fifo-size", &prop) == 0)
|
|
|
|
port->fifosize = prop;
|
|
|
|
|
2014-12-06 02:21:57 +07:00
|
|
|
/* Check for a fixed line number */
|
|
|
|
ret = of_alias_get_id(np, "serial");
|
|
|
|
if (ret >= 0)
|
|
|
|
port->line = ret;
|
|
|
|
|
2007-02-14 03:35:38 +07:00
|
|
|
port->irq = irq_of_parse_and_map(np, 0);
|
|
|
|
port->iotype = UPIO_MEM;
|
2011-07-01 01:39:12 +07:00
|
|
|
if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
|
|
|
|
switch (prop) {
|
2011-06-27 19:32:34 +07:00
|
|
|
case 1:
|
|
|
|
port->iotype = UPIO_MEM;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
port->iotype = UPIO_MEM32;
|
|
|
|
break;
|
|
|
|
default:
|
2011-07-01 01:39:12 +07:00
|
|
|
dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n",
|
|
|
|
prop);
|
2012-10-22 22:58:01 +07:00
|
|
|
ret = -EINVAL;
|
|
|
|
goto out;
|
2011-06-27 19:32:34 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-02-14 03:35:38 +07:00
|
|
|
port->type = type;
|
2011-07-01 01:39:12 +07:00
|
|
|
port->uartclk = clk;
|
serial: define FIXED_PORT flag for serial_core
At present, the serial core always allows setserial in userspace to change the
port address, irq and base clock of any serial port. That makes sense for
legacy ISA ports, but not for (say) embedded ns16550 compatible serial ports
at peculiar addresses. In these cases, the kernel code configuring the ports
must know exactly where they are, and their clocking arrangements (which can
be unusual on embedded boards). It doesn't make sense for userspace to change
these settings.
Therefore, this patch defines a UPF_FIXED_PORT flag for the uart_port
structure. If this flag is set when the serial port is configured, any
attempts to alter the port's type, io address, irq or base clock with
setserial are ignored.
In addition this patch uses the new flag for on-chip serial ports probed in
arch/powerpc/kernel/legacy_serial.c, and for other hard-wired serial ports
probed by drivers/serial/of_serial.c.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 04:48:49 +07:00
|
|
|
port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
|
2009-06-09 20:39:47 +07:00
|
|
|
| UPF_FIXED_PORT | UPF_FIXED_TYPE;
|
2012-07-17 23:08:31 +07:00
|
|
|
|
|
|
|
if (of_find_property(np, "no-loopback-test", NULL))
|
|
|
|
port->flags |= UPF_SKIP_TEST;
|
|
|
|
|
2007-02-14 03:35:38 +07:00
|
|
|
port->dev = &ofdev->dev;
|
|
|
|
|
2014-10-17 02:48:21 +07:00
|
|
|
switch (type) {
|
|
|
|
case PORT_TEGRA:
|
2012-04-11 04:10:53 +07:00
|
|
|
port->handle_break = tegra_serial_handle_break;
|
2014-10-17 02:48:21 +07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PORT_RT2880:
|
|
|
|
port->iotype = UPIO_AU;
|
|
|
|
break;
|
|
|
|
}
|
2012-04-11 04:10:53 +07:00
|
|
|
|
2007-02-14 03:35:38 +07:00
|
|
|
return 0;
|
2012-10-22 22:58:01 +07:00
|
|
|
out:
|
|
|
|
if (info->clk)
|
|
|
|
clk_disable_unprepare(info->clk);
|
|
|
|
return ret;
|
2007-02-14 03:35:38 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Try to register a serial port
|
|
|
|
*/
|
2011-05-19 00:19:24 +07:00
|
|
|
static struct of_device_id of_platform_serial_table[];
|
2012-11-20 01:21:50 +07:00
|
|
|
static int of_platform_serial_probe(struct platform_device *ofdev)
|
2007-02-14 03:35:38 +07:00
|
|
|
{
|
2011-05-19 00:19:24 +07:00
|
|
|
const struct of_device_id *match;
|
2007-05-31 16:33:04 +07:00
|
|
|
struct of_serial_info *info;
|
2007-02-14 03:35:38 +07:00
|
|
|
struct uart_port port;
|
|
|
|
int port_type;
|
|
|
|
int ret;
|
|
|
|
|
2011-05-19 00:19:24 +07:00
|
|
|
match = of_match_device(of_platform_serial_table, &ofdev->dev);
|
|
|
|
if (!match)
|
2011-02-23 11:10:26 +07:00
|
|
|
return -EINVAL;
|
|
|
|
|
2010-04-14 06:12:29 +07:00
|
|
|
if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL))
|
2007-02-14 03:35:38 +07:00
|
|
|
return -EBUSY;
|
|
|
|
|
2014-10-21 15:50:21 +07:00
|
|
|
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
2007-05-31 16:33:04 +07:00
|
|
|
if (info == NULL)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2011-05-19 00:19:24 +07:00
|
|
|
port_type = (unsigned long)match->data;
|
2012-10-22 22:58:01 +07:00
|
|
|
ret = of_platform_serial_setup(ofdev, port_type, &port, info);
|
2007-02-14 03:35:38 +07:00
|
|
|
if (ret)
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
switch (port_type) {
|
2009-01-07 16:32:38 +07:00
|
|
|
#ifdef CONFIG_SERIAL_8250
|
2007-02-14 03:35:38 +07:00
|
|
|
case PORT_8250 ... PORT_MAX_8250:
|
2012-07-17 23:06:20 +07:00
|
|
|
{
|
|
|
|
struct uart_8250_port port8250;
|
|
|
|
memset(&port8250, 0, sizeof(port8250));
|
2014-05-14 05:04:39 +07:00
|
|
|
port.type = port_type;
|
2012-07-17 23:06:20 +07:00
|
|
|
port8250.port = port;
|
2013-03-25 20:51:15 +07:00
|
|
|
|
|
|
|
if (port.fifosize)
|
|
|
|
port8250.capabilities = UART_CAP_FIFO;
|
|
|
|
|
|
|
|
if (of_property_read_bool(ofdev->dev.of_node,
|
|
|
|
"auto-flow-control"))
|
|
|
|
port8250.capabilities |= UART_CAP_AFE;
|
|
|
|
|
2012-07-17 23:06:20 +07:00
|
|
|
ret = serial8250_register_8250_port(&port8250);
|
2007-02-14 03:35:38 +07:00
|
|
|
break;
|
2012-07-17 23:06:20 +07:00
|
|
|
}
|
2009-01-07 16:32:38 +07:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
|
|
|
|
case PORT_NWPSERIAL:
|
|
|
|
ret = nwpserial_register_port(&port);
|
|
|
|
break;
|
|
|
|
#endif
|
2007-02-14 03:35:38 +07:00
|
|
|
default:
|
|
|
|
/* need to add code for these */
|
2007-05-31 16:30:33 +07:00
|
|
|
case PORT_UNKNOWN:
|
|
|
|
dev_info(&ofdev->dev, "Unknown serial port found, ignored\n");
|
2007-02-14 03:35:38 +07:00
|
|
|
ret = -ENODEV;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (ret < 0)
|
|
|
|
goto out;
|
|
|
|
|
2007-05-31 16:33:04 +07:00
|
|
|
info->type = port_type;
|
|
|
|
info->line = ret;
|
2013-05-23 17:39:36 +07:00
|
|
|
platform_set_drvdata(ofdev, info);
|
2007-02-14 03:35:38 +07:00
|
|
|
return 0;
|
|
|
|
out:
|
2007-05-31 16:33:04 +07:00
|
|
|
kfree(info);
|
2007-02-14 03:35:38 +07:00
|
|
|
irq_dispose_mapping(port.irq);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Release a line
|
|
|
|
*/
|
2010-08-06 22:25:50 +07:00
|
|
|
static int of_platform_serial_remove(struct platform_device *ofdev)
|
2007-02-14 03:35:38 +07:00
|
|
|
{
|
2013-05-23 17:39:36 +07:00
|
|
|
struct of_serial_info *info = platform_get_drvdata(ofdev);
|
2007-05-31 16:33:04 +07:00
|
|
|
switch (info->type) {
|
2009-01-07 16:32:38 +07:00
|
|
|
#ifdef CONFIG_SERIAL_8250
|
2007-05-31 16:33:04 +07:00
|
|
|
case PORT_8250 ... PORT_MAX_8250:
|
|
|
|
serial8250_unregister_port(info->line);
|
|
|
|
break;
|
2009-01-07 16:32:38 +07:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
|
|
|
|
case PORT_NWPSERIAL:
|
|
|
|
nwpserial_unregister_port(info->line);
|
|
|
|
break;
|
|
|
|
#endif
|
2007-05-31 16:33:04 +07:00
|
|
|
default:
|
|
|
|
/* need to add code for these */
|
|
|
|
break;
|
|
|
|
}
|
2012-10-22 22:58:01 +07:00
|
|
|
|
|
|
|
if (info->clk)
|
|
|
|
clk_disable_unprepare(info->clk);
|
2007-05-31 16:33:04 +07:00
|
|
|
kfree(info);
|
2007-02-14 03:35:38 +07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-11-11 14:09:05 +07:00
|
|
|
#ifdef CONFIG_PM_SLEEP
|
|
|
|
#ifdef CONFIG_SERIAL_8250
|
|
|
|
static void of_serial_suspend_8250(struct of_serial_info *info)
|
|
|
|
{
|
|
|
|
struct uart_8250_port *port8250 = serial8250_get_port(info->line);
|
|
|
|
struct uart_port *port = &port8250->port;
|
|
|
|
|
|
|
|
serial8250_suspend_port(info->line);
|
|
|
|
if (info->clk && (!uart_console(port) || console_suspend_enabled))
|
|
|
|
clk_disable_unprepare(info->clk);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void of_serial_resume_8250(struct of_serial_info *info)
|
|
|
|
{
|
|
|
|
struct uart_8250_port *port8250 = serial8250_get_port(info->line);
|
|
|
|
struct uart_port *port = &port8250->port;
|
|
|
|
|
|
|
|
if (info->clk && (!uart_console(port) || console_suspend_enabled))
|
|
|
|
clk_prepare_enable(info->clk);
|
|
|
|
|
|
|
|
serial8250_resume_port(info->line);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
static inline void of_serial_suspend_8250(struct of_serial_info *info)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void of_serial_resume_8250(struct of_serial_info *info)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static int of_serial_suspend(struct device *dev)
|
|
|
|
{
|
|
|
|
struct of_serial_info *info = dev_get_drvdata(dev);
|
|
|
|
|
|
|
|
switch (info->type) {
|
|
|
|
case PORT_8250 ... PORT_MAX_8250:
|
|
|
|
of_serial_suspend_8250(info);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int of_serial_resume(struct device *dev)
|
|
|
|
{
|
|
|
|
struct of_serial_info *info = dev_get_drvdata(dev);
|
|
|
|
|
|
|
|
switch (info->type) {
|
|
|
|
case PORT_8250 ... PORT_MAX_8250:
|
|
|
|
of_serial_resume_8250(info);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
static SIMPLE_DEV_PM_OPS(of_serial_pm_ops, of_serial_suspend, of_serial_resume);
|
|
|
|
|
2007-02-14 03:35:38 +07:00
|
|
|
/*
|
|
|
|
* A few common types, add more as needed.
|
|
|
|
*/
|
2012-11-20 01:24:32 +07:00
|
|
|
static struct of_device_id of_platform_serial_table[] = {
|
2011-02-23 09:12:21 +07:00
|
|
|
{ .compatible = "ns8250", .data = (void *)PORT_8250, },
|
|
|
|
{ .compatible = "ns16450", .data = (void *)PORT_16450, },
|
|
|
|
{ .compatible = "ns16550a", .data = (void *)PORT_16550A, },
|
|
|
|
{ .compatible = "ns16550", .data = (void *)PORT_16550, },
|
|
|
|
{ .compatible = "ns16750", .data = (void *)PORT_16750, },
|
|
|
|
{ .compatible = "ns16850", .data = (void *)PORT_16850, },
|
2011-07-06 12:42:36 +07:00
|
|
|
{ .compatible = "nvidia,tegra20-uart", .data = (void *)PORT_TEGRA, },
|
2012-06-12 02:57:14 +07:00
|
|
|
{ .compatible = "nxp,lpc3220-uart", .data = (void *)PORT_LPC3220, },
|
2014-10-17 02:48:21 +07:00
|
|
|
{ .compatible = "ralink,rt2880-uart", .data = (void *)PORT_RT2880, },
|
2013-03-07 09:28:37 +07:00
|
|
|
{ .compatible = "altr,16550-FIFO32",
|
|
|
|
.data = (void *)PORT_ALTR_16550_F32, },
|
|
|
|
{ .compatible = "altr,16550-FIFO64",
|
|
|
|
.data = (void *)PORT_ALTR_16550_F64, },
|
|
|
|
{ .compatible = "altr,16550-FIFO128",
|
|
|
|
.data = (void *)PORT_ALTR_16550_F128, },
|
2015-01-27 11:50:08 +07:00
|
|
|
{ .compatible = "mrvl,mmp-uart",
|
|
|
|
.data = (void *)PORT_XSCALE, },
|
|
|
|
{ .compatible = "mrvl,pxa-uart",
|
|
|
|
.data = (void *)PORT_XSCALE, },
|
2009-01-07 16:32:38 +07:00
|
|
|
#ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
|
2011-02-23 09:12:21 +07:00
|
|
|
{ .compatible = "ibm,qpace-nwp-serial",
|
|
|
|
.data = (void *)PORT_NWPSERIAL, },
|
2009-01-07 16:32:38 +07:00
|
|
|
#endif
|
2011-02-23 09:12:21 +07:00
|
|
|
{ .type = "serial", .data = (void *)PORT_UNKNOWN, },
|
2007-02-14 03:35:38 +07:00
|
|
|
{ /* end of list */ },
|
|
|
|
};
|
|
|
|
|
2011-02-23 11:10:26 +07:00
|
|
|
static struct platform_driver of_platform_serial_driver = {
|
2010-04-14 06:13:02 +07:00
|
|
|
.driver = {
|
|
|
|
.name = "of_serial",
|
|
|
|
.of_match_table = of_platform_serial_table,
|
|
|
|
},
|
2007-02-14 03:35:38 +07:00
|
|
|
.probe = of_platform_serial_probe,
|
|
|
|
.remove = of_platform_serial_remove,
|
|
|
|
};
|
|
|
|
|
2011-10-06 00:29:49 +07:00
|
|
|
module_platform_driver(of_platform_serial_driver);
|
2007-02-14 03:35:38 +07:00
|
|
|
|
|
|
|
MODULE_AUTHOR("Arnd Bergmann <arnd@arndb.de>");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_DESCRIPTION("Serial Port driver for Open Firmware platform devices");
|