Commit 03b8cad5 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-serial

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents ec2319ca 33e8a4f8
......@@ -198,10 +198,26 @@ static struct platform_device pxafb_device = {
.resource = pxafb_resources,
};
static struct platform_device ffuart_device = {
.name = "pxa2xx-uart",
.id = 0,
};
static struct platform_device btuart_device = {
.name = "pxa2xx-uart",
.id = 1,
};
static struct platform_device stuart_device = {
.name = "pxa2xx-uart",
.id = 2,
};
static struct platform_device *devices[] __initdata = {
&pxamci_device,
&udc_device,
&pxafb_device,
&ffuart_device,
&btuart_device,
&stuart_device,
};
static int __init pxa_init(void)
......
......@@ -603,5 +603,28 @@ config SERIAL_PMACZILOG_CONSOLE
on your PowerMac as the console, you can do so by answering
Y to this option.
config SERIAL_LH7A40X
tristate "Sharp LH7A40X embedded UART support"
depends on ARM && ARCH_LH7A40X
select SERIAL_CORE
help
This enables support for the three on-board UARTs of the
Sharp LH7A40X series CPUs. Choose Y or M.
config SERIAL_LH7A40X_CONSOLE
bool "Support for connsole on Sharp LH7A40X serial port"
depends on SERIAL_LH7A40X=y
select SERIAL_CORE_CONSOLE
help
Say Y here if you wish to use one of the serial ports as the
system console--the system console is the device which
receives all kernel messages and warnings and which allows
logins in single user mode.
Even if you say Y here, the currently visible framebuffer console
(/dev/tty0) will still be used as the default system console, but
you can alter that using a kernel command line, for example
"console=ttyAM1".
endmenu
......@@ -34,6 +34,7 @@ obj-$(CONFIG_SERIAL_68360) += 68360serial.o
obj-$(CONFIG_SERIAL_COLDFIRE) += mcfserial.o
obj-$(CONFIG_V850E_UART) += v850e_uart.o
obj-$(CONFIG_SERIAL_PMACZILOG) += pmac_zilog.o
obj-$(CONFIG_SERIAL_LH7A40X) += serial_lh7a40x.o
obj-$(CONFIG_SERIAL_AU1X00) += au1x00_uart.o
obj-$(CONFIG_SERIAL_DZ) += dz.o
obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o
......
......@@ -35,6 +35,7 @@
#include <linux/circ_buf.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <asm/io.h>
#include <asm/hardware.h>
......@@ -804,26 +805,76 @@ static struct uart_driver serial_pxa_reg = {
.cons = PXA_CONSOLE,
};
static int __init serial_pxa_init(void)
static int serial_pxa_suspend(struct device *_dev, u32 state, u32 level)
{
int i, ret;
struct uart_pxa_port *sport = dev_get_drvdata(_dev);
ret = uart_register_driver(&serial_pxa_reg);
if (ret)
return ret;
if (sport && level == SUSPEND_DISABLE)
uart_suspend_port(&serial_pxa_reg, &sport->port);
return 0;
}
static int serial_pxa_resume(struct device *_dev, u32 level)
{
struct uart_pxa_port *sport = dev_get_drvdata(_dev);
for (i = 0; i < ARRAY_SIZE(serial_pxa_ports); i++)
uart_add_one_port(&serial_pxa_reg, &serial_pxa_ports[i].port);
if (sport && level == RESUME_ENABLE)
uart_resume_port(&serial_pxa_reg, &sport->port);
return 0;
}
static void __exit serial_pxa_exit(void)
static int serial_pxa_probe(struct device *_dev)
{
int i;
struct platform_device *dev = to_platform_device(_dev);
serial_pxa_ports[dev->id].port.dev = _dev;
uart_add_one_port(&serial_pxa_reg, &serial_pxa_ports[dev->id].port);
dev_set_drvdata(_dev, &serial_pxa_ports[dev->id]);
return 0;
}
static int serial_pxa_remove(struct device *_dev)
{
struct uart_pxa_port *sport = dev_get_drvdata(_dev);
dev_set_drvdata(_dev, NULL);
if (sport)
uart_remove_one_port(&serial_pxa_reg, &sport->port);
return 0;
}
static struct device_driver serial_pxa_driver = {
.name = "pxa2xx-uart",
.bus = &platform_bus_type,
.probe = serial_pxa_probe,
.remove = serial_pxa_remove,
.suspend = serial_pxa_suspend,
.resume = serial_pxa_resume,
};
int __init serial_pxa_init(void)
{
int ret;
ret = uart_register_driver(&serial_pxa_reg);
if (ret != 0)
return ret;
ret = driver_register(&serial_pxa_driver);
if (ret != 0)
uart_unregister_driver(&serial_pxa_reg);
for (i = 0; i < ARRAY_SIZE(serial_pxa_ports); i++)
uart_remove_one_port(&serial_pxa_reg, &serial_pxa_ports[i].port);
return ret;
}
void __exit serial_pxa_exit(void)
{
driver_unregister(&serial_pxa_driver);
uart_unregister_driver(&serial_pxa_reg);
}
......
This diff is collapsed.
......@@ -80,6 +80,9 @@
/* SGI IP22 aka Indy / Challenge S / Indigo 2 */
#define PORT_IP22ZILOG 56
/* Sharp LH7a40x -- an ARM9 SoC series */
#define PORT_LH7A40X 57
#ifdef __KERNEL__
#include <linux/config.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment