Commit 373d2673 authored by Russell King's avatar Russell King

[SERIAL] Undo "get_legacy_serial_ports" patch for PPC.

This patch conflicts with work to properly integrate the device model
into the serial layer, and provide architectures with a *clean* way
to tell 8250.c about their serial ports at run time.
parent 702e4ff4
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <linux/serialP.h> #include <linux/serialP.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/8250.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -42,6 +41,7 @@ ...@@ -42,6 +41,7 @@
#endif #endif
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include "8250.h"
/* /*
* Configuration: * Configuration:
...@@ -112,17 +112,11 @@ unsigned int share_irqs = SERIAL8250_SHARE_IRQS; ...@@ -112,17 +112,11 @@ unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
#define SERIAL_PORT_DFNS #define SERIAL_PORT_DFNS
#endif #endif
#ifndef ARCH_HAS_GET_LEGACY_SERIAL_PORTS
static struct old_serial_port old_serial_port[] = { static struct old_serial_port old_serial_port[] = {
SERIAL_PORT_DFNS /* defined in asm/serial.h */ SERIAL_PORT_DFNS /* defined in asm/serial.h */
}; };
static inline struct old_serial_port *get_legacy_serial_ports(unsigned int *count)
{
*count = ARRAY_SIZE(old_serial_port);
return old_serial_port;
}
#define UART_NR (ARRAY_SIZE(old_serial_port) + CONFIG_SERIAL_8250_NR_UARTS) #define UART_NR (ARRAY_SIZE(old_serial_port) + CONFIG_SERIAL_8250_NR_UARTS)
#endif /* ARCH_HAS_DYNAMIC_LEGACY_SERIAL_PORTS */
#ifdef CONFIG_SERIAL_8250_RSA #ifdef CONFIG_SERIAL_8250_RSA
...@@ -1964,27 +1958,22 @@ static void __init serial8250_isa_init_ports(void) ...@@ -1964,27 +1958,22 @@ static void __init serial8250_isa_init_ports(void)
{ {
struct uart_8250_port *up; struct uart_8250_port *up;
static int first = 1; static int first = 1;
struct old_serial_port *old_ports;
int count;
int i; int i;
if (!first) if (!first)
return; return;
first = 0; first = 0;
old_ports = get_legacy_serial_ports(&count); for (i = 0, up = serial8250_ports; i < ARRAY_SIZE(old_serial_port);
if (old_ports == NULL) i++, up++) {
return; up->port.iobase = old_serial_port[i].port;
up->port.irq = irq_canonicalize(old_serial_port[i].irq);
for (i = 0, up = serial8250_ports; i < count; i++, up++) { up->port.uartclk = old_serial_port[i].baud_base * 16;
up->port.iobase = old_ports[i].port; up->port.flags = old_serial_port[i].flags;
up->port.irq = irq_canonicalize(old_ports[i].irq); up->port.hub6 = old_serial_port[i].hub6;
up->port.uartclk = old_ports[i].baud_base * 16; up->port.membase = old_serial_port[i].iomem_base;
up->port.flags = old_ports[i].flags; up->port.iotype = old_serial_port[i].io_type;
up->port.hub6 = old_ports[i].hub6; up->port.regshift = old_serial_port[i].iomem_reg_shift;
up->port.membase = old_ports[i].iomem_base;
up->port.iotype = old_ports[i].io_type;
up->port.regshift = old_ports[i].iomem_reg_shift;
up->port.ops = &serial8250_pops; up->port.ops = &serial8250_pops;
if (share_irqs) if (share_irqs)
up->port.flags |= UPF_SHARE_IRQ; up->port.flags |= UPF_SHARE_IRQ;
......
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/bitops.h>
#include <linux/8250.h>
#include <linux/8250_pci.h> #include <linux/8250_pci.h>
#include <linux/bitops.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/io.h> #include <asm/io.h>
#include "8250.h"
/* /*
* Definitions for PCI support. * Definitions for PCI support.
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
#include <linux/serialP.h> #include <linux/serialP.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/8250.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/serial.h> #include <asm/serial.h>
#include "8250.h"
#define UNKNOWN_DEV 0x3000 #define UNKNOWN_DEV 0x3000
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serialP.h> #include <linux/serialP.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/8250.h>
#include <asm/serial.h> #include <asm/serial.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -41,6 +40,7 @@ ...@@ -41,6 +40,7 @@
#endif #endif
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include "8250.h"
/* /*
* Debugging. * Debugging.
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/8250.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -56,6 +55,8 @@ ...@@ -56,6 +55,8 @@
#include <pcmcia/ds.h> #include <pcmcia/ds.h>
#include <pcmcia/cisreg.h> #include <pcmcia/cisreg.h>
#include "8250.h"
#ifdef PCMCIA_DEBUG #ifdef PCMCIA_DEBUG
static int pc_debug = PCMCIA_DEBUG; static int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i"); MODULE_PARM(pc_debug, "i");
......
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