aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 23:31:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 23:31:32 -0500
commit36ddf5bbdea7ba4582abc62f106f0f0e9f0b6b91 (patch)
tree163d637dfda12eba3f8822d3b2941869b2d0ba00
parenta41622eaa97e40c811fb7756f403c0d4caa65654 (diff)
parent104c7b03ea0913a24be103db66d8cf1f1f99a49a (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial: [ARM] 3383/3: ixp2000: ixdp2x01 platform serial conversion [SERIAL] amba-pl010: Remove accessor macros [SERIAL] remove 8250_acpi (replaced by 8250_pnp and PNPACPI) [SERIAL] icom: select FW_LOADER
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c78
-rw-r--r--drivers/serial/8250_acpi.c183
-rw-r--r--drivers/serial/Kconfig9
-rw-r--r--drivers/serial/Makefile1
-rw-r--r--drivers/serial/amba-pl010.c110
-rw-r--r--include/linux/serial_8250.h1
6 files changed, 110 insertions, 272 deletions
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index f9d4968c1d..66915282a4 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial_core.h> 31#include <linux/serial_core.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/serial_8250.h>
33 34
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/irq.h> 36#include <asm/irq.h>
@@ -132,7 +133,7 @@ void __init ixdp2x01_init_irq(void)
132 133
133 134
134/************************************************************************* 135/*************************************************************************
135 * IXDP2x01 memory map and serial ports 136 * IXDP2x01 memory map
136 *************************************************************************/ 137 *************************************************************************/
137static struct map_desc ixdp2x01_io_desc __initdata = { 138static struct map_desc ixdp2x01_io_desc __initdata = {
138 .virtual = IXDP2X01_VIRT_CPLD_BASE, 139 .virtual = IXDP2X01_VIRT_CPLD_BASE,
@@ -141,40 +142,78 @@ static struct map_desc ixdp2x01_io_desc __initdata = {
141 .type = MT_DEVICE 142 .type = MT_DEVICE
142}; 143};
143 144
144static struct uart_port ixdp2x01_serial_ports[2] = { 145static void __init ixdp2x01_map_io(void)
146{
147 ixp2000_map_io();
148 iotable_init(&ixdp2x01_io_desc, 1);
149}
150
151
152/*************************************************************************
153 * IXDP2x01 serial ports
154 *************************************************************************/
155static struct plat_serial8250_port ixdp2x01_serial_port1[] = {
145 { 156 {
146 .membase = (char *)(IXDP2X01_UART1_VIRT_BASE),
147 .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE, 157 .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE,
158 .membase = (char *)IXDP2X01_UART1_VIRT_BASE,
148 .irq = IRQ_IXDP2X01_UART1, 159 .irq = IRQ_IXDP2X01_UART1,
149 .flags = UPF_SKIP_TEST, 160 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
150 .iotype = UPIO_MEM32, 161 .iotype = UPIO_MEM32,
151 .regshift = 2, 162 .regshift = 2,
152 .uartclk = IXDP2X01_UART_CLK, 163 .uartclk = IXDP2X01_UART_CLK,
153 .line = 1, 164 },
154 .type = PORT_16550A, 165 { }
155 .fifosize = 16 166};
156 }, { 167
157 .membase = (char *)(IXDP2X01_UART2_VIRT_BASE), 168static struct resource ixdp2x01_uart_resource1 = {
169 .start = IXDP2X01_UART1_PHYS_BASE,
170 .end = IXDP2X01_UART1_PHYS_BASE + 0xffff,
171 .flags = IORESOURCE_MEM,
172};
173
174static struct platform_device ixdp2x01_serial_device1 = {
175 .name = "serial8250",
176 .id = PLAT8250_DEV_PLATFORM1,
177 .dev = {
178 .platform_data = ixdp2x01_serial_port1,
179 },
180 .num_resources = 1,
181 .resource = &ixdp2x01_uart_resource1,
182};
183
184static struct plat_serial8250_port ixdp2x01_serial_port2[] = {
185 {
158 .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE, 186 .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE,
187 .membase = (char *)IXDP2X01_UART2_VIRT_BASE,
159 .irq = IRQ_IXDP2X01_UART2, 188 .irq = IRQ_IXDP2X01_UART2,
160 .flags = UPF_SKIP_TEST, 189 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
161 .iotype = UPIO_MEM32, 190 .iotype = UPIO_MEM32,
162 .regshift = 2, 191 .regshift = 2,
163 .uartclk = IXDP2X01_UART_CLK, 192 .uartclk = IXDP2X01_UART_CLK,
164 .line = 2,
165 .type = PORT_16550A,
166 .fifosize = 16
167 }, 193 },
194 { }
168}; 195};
169 196
170static void __init ixdp2x01_map_io(void) 197static struct resource ixdp2x01_uart_resource2 = {
171{ 198 .start = IXDP2X01_UART2_PHYS_BASE,
172 ixp2000_map_io(); 199 .end = IXDP2X01_UART2_PHYS_BASE + 0xffff,
200 .flags = IORESOURCE_MEM,
201};
173 202
174 iotable_init(&ixdp2x01_io_desc, 1); 203static struct platform_device ixdp2x01_serial_device2 = {
204 .name = "serial8250",
205 .id = PLAT8250_DEV_PLATFORM2,
206 .dev = {
207 .platform_data = ixdp2x01_serial_port2,
208 },
209 .num_resources = 1,
210 .resource = &ixdp2x01_uart_resource2,
211};
175 212
176 early_serial_setup(&ixdp2x01_serial_ports[0]); 213static void ixdp2x01_uart_init(void)
177 early_serial_setup(&ixdp2x01_serial_ports[1]); 214{
215 platform_device_register(&ixdp2x01_serial_device1);
216 platform_device_register(&ixdp2x01_serial_device2);
178} 217}
179 218
180 219
@@ -374,6 +413,7 @@ static void __init ixdp2x01_init_machine(void)
374 413
375 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); 414 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices));
376 ixp2000_uart_init(); 415 ixp2000_uart_init();
416 ixdp2x01_uart_init();
377} 417}
378 418
379 419
diff --git a/drivers/serial/8250_acpi.c b/drivers/serial/8250_acpi.c
deleted file mode 100644
index 809f89ab96..0000000000
--- a/drivers/serial/8250_acpi.c
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * Copyright (c) 2002-2003 Matthew Wilcox for Hewlett-Packard
3 * Copyright (C) 2004 Hewlett-Packard Co
4 * Bjorn Helgaas <bjorn.helgaas@hp.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#include <linux/acpi.h>
13#include <linux/init.h>
14#include <linux/module.h>
15#include <linux/serial_core.h>
16
17#include <acpi/acpi_bus.h>
18
19#include <asm/io.h>
20
21#include "8250.h"
22
23struct serial_private {
24 int line;
25};
26
27static acpi_status acpi_serial_mmio(struct uart_port *port,
28 struct acpi_resource_address64 *addr)
29{
30 port->mapbase = addr->minimum;
31 port->iotype = UPIO_MEM;
32 port->flags |= UPF_IOREMAP;
33 return AE_OK;
34}
35
36static acpi_status acpi_serial_port(struct uart_port *port,
37 struct acpi_resource_io *io)
38{
39 if (io->address_length) {
40 port->iobase = io->minimum;
41 port->iotype = UPIO_PORT;
42 } else
43 printk(KERN_ERR "%s: zero-length IO port range?\n", __FUNCTION__);
44 return AE_OK;
45}
46
47static acpi_status acpi_serial_ext_irq(struct uart_port *port,
48 struct acpi_resource_extended_irq *ext_irq)
49{
50 int rc;
51
52 if (ext_irq->interrupt_count > 0) {
53 rc = acpi_register_gsi(ext_irq->interrupts[0],
54 ext_irq->triggering, ext_irq->polarity);
55 if (rc < 0)
56 return AE_ERROR;
57 port->irq = rc;
58 }
59 return AE_OK;
60}
61
62static acpi_status acpi_serial_irq(struct uart_port *port,
63 struct acpi_resource_irq *irq)
64{
65 int rc;
66
67 if (irq->interrupt_count > 0) {