Skip to content

Commit 36ddf5b

Browse files
author
Linus Torvalds
committed
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
2 parents a41622e + 104c7b0 commit 36ddf5b

6 files changed

Lines changed: 110 additions & 272 deletions

File tree

‎arch/arm/mach-ixp2000/ixdp2x01.c‎

Lines changed: 59 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <linux/tty.h>
3131
#include <linux/serial_core.h>
3232
#include <linux/platform_device.h>
33+
#include <linux/serial_8250.h>
3334

3435
#include <asm/io.h>
3536
#include <asm/irq.h>
@@ -132,7 +133,7 @@ void __init ixdp2x01_init_irq(void)
132133

133134

134135
/*************************************************************************
135-
* IXDP2x01 memory map and serial ports
136+
* IXDP2x01 memory map
136137
*************************************************************************/
137138
static struct map_desc ixdp2x01_io_desc __initdata = {
138139
.virtual = IXDP2X01_VIRT_CPLD_BASE,
@@ -141,40 +142,78 @@ static struct map_desc ixdp2x01_io_desc __initdata = {
141142
.type = MT_DEVICE
142143
};
143144

144-
static struct uart_port ixdp2x01_serial_ports[2] = {
145+
static 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+
*************************************************************************/
155+
static struct plat_serial8250_port ixdp2x01_serial_port1[] = {
145156
{
146-
.membase = (char *)(IXDP2X01_UART1_VIRT_BASE),
147157
.mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE,
158+
.membase = (char *)IXDP2X01_UART1_VIRT_BASE,
148159
.irq = IRQ_IXDP2X01_UART1,
149-
.flags = UPF_SKIP_TEST,
160+
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
150161
.iotype = UPIO_MEM32,
151162
.regshift = 2,
152163
.uartclk = IXDP2X01_UART_CLK,
153-
.line = 1,
154-
.type = PORT_16550A,
155-
.fifosize = 16
156-
}, {
157-
.membase = (char *)(IXDP2X01_UART2_VIRT_BASE),
164+
},
165+
{ }
166+
};
167+
168+
static struct resource ixdp2x01_uart_resource1 = {
169+
.start = IXDP2X01_UART1_PHYS_BASE,
170+
.end = IXDP2X01_UART1_PHYS_BASE + 0xffff,
171+
.flags = IORESOURCE_MEM,
172+
};
173+
174+
static 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+
184+
static struct plat_serial8250_port ixdp2x01_serial_port2[] = {
185+
{
158186
.mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE,
187+
.membase = (char *)IXDP2X01_UART2_VIRT_BASE,
159188
.irq = IRQ_IXDP2X01_UART2,
160-
.flags = UPF_SKIP_TEST,
189+
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
161190
.iotype = UPIO_MEM32,
162191
.regshift = 2,
163192
.uartclk = IXDP2X01_UART_CLK,
164-
.line = 2,
165-
.type = PORT_16550A,
166-
.fifosize = 16
167193
},
194+
{ }
168195
};
169196

170-
static void __init ixdp2x01_map_io(void)
171-
{
172-
ixp2000_map_io();
197+
static struct resource ixdp2x01_uart_resource2 = {
198+
.start = IXDP2X01_UART2_PHYS_BASE,
199+
.end = IXDP2X01_UART2_PHYS_BASE + 0xffff,
200+
.flags = IORESOURCE_MEM,
201+
};
173202

174-
iotable_init(&ixdp2x01_io_desc, 1);
203+
static 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+
};
175212

176-
early_serial_setup(&ixdp2x01_serial_ports[0]);
177-
early_serial_setup(&ixdp2x01_serial_ports[1]);
213+
static void ixdp2x01_uart_init(void)
214+
{
215+
platform_device_register(&ixdp2x01_serial_device1);
216+
platform_device_register(&ixdp2x01_serial_device2);
178217
}
179218

180219

@@ -374,6 +413,7 @@ static void __init ixdp2x01_init_machine(void)
374413

375414
platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices));
376415
ixp2000_uart_init();
416+
ixdp2x01_uart_init();
377417
}
378418

379419

‎drivers/serial/8250_acpi.c‎

Lines changed: 0 additions & 183 deletions
This file was deleted.

‎drivers/serial/Kconfig‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,6 @@ config SERIAL_8250_CS
7777

7878
If unsure, say N.
7979

80-
config SERIAL_8250_ACPI
81-
bool "8250/16550 device discovery via ACPI namespace"
82-
default y if IA64
83-
depends on ACPI && SERIAL_8250
84-
---help---
85-
If you wish to enable serial port discovery via the ACPI
86-
namespace, say Y here. If unsure, say N.
87-
8880
config SERIAL_8250_NR_UARTS
8981
int "Maximum number of 8250/16550 serial ports"
9082
depends on SERIAL_8250
@@ -827,6 +819,7 @@ config SERIAL_ICOM
827819
tristate "IBM Multiport Serial Adapter"
828820
depends on PCI && (PPC_ISERIES || PPC_PSERIES)
829821
select SERIAL_CORE
822+
select FW_LOADER
830823
help
831824
This driver is for a family of multiport serial adapters
832825
including 2 port RVX, 2 port internal modem, 4 port internal

‎drivers/serial/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#
66

77
serial-8250-y :=
8-
serial-8250-$(CONFIG_SERIAL_8250_ACPI) += 8250_acpi.o
98
serial-8250-$(CONFIG_PNP) += 8250_pnp.o
109
serial-8250-$(CONFIG_GSC) += 8250_gsc.o
1110
serial-8250-$(CONFIG_PCI) += 8250_pci.o

0 commit comments

Comments
 (0)