Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce7240e4 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

8250: three way resolve of the 8250 diffs



This resolves the differences between the original 8250 patch, the revised 8250 patch
and the independant clean up of the octeon driver (to use platform devices properly yay!)

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9833facf
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -430,7 +430,7 @@ static ssize_t mwave_write(struct file *file, const char __user *buf,

static int register_serial_portandirq(unsigned int port, int irq)
{
	struct uart_port uart;
	struct uart_8250_port uart;
	
	switch ( port ) {
		case 0x3f8:
@@ -462,14 +462,14 @@ static int register_serial_portandirq(unsigned int port, int irq)
	} /* switch */
	/* irq is okay */

	memset(&uart, 0, sizeof(struct uart_port));
	memset(&uart, 0, sizeof(uart));
	
	uart.uartclk =  1843200;
	uart.iobase = port;
	uart.irq = irq;
	uart.iotype = UPIO_PORT;
	uart.flags =  UPF_SHARE_IRQ;
	return serial8250_register_port(&uart);
	uart.port.uartclk =  1843200;
	uart.port.iobase = port;
	uart.port.irq = irq;
	uart.port.iotype = UPIO_PORT;
	uart.port.flags =  UPF_SHARE_IRQ;
	return serial8250_register_8250_port(&uart);
}


+8 −8
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@

void ibmasm_register_uart(struct service_processor *sp)
{
	struct uart_port uport;
	struct uart_8250_port uart;
	void __iomem *iomem_base;

	iomem_base = sp->base_address + SCOUT_COM_B_BASE;
@@ -47,14 +47,14 @@ void ibmasm_register_uart(struct service_processor *sp)
		return;
	}

	memset(&uport, 0, sizeof(struct uart_port));
	uport.irq	= sp->irq;
	uport.uartclk	= 3686400;
	uport.flags	= UPF_SHARE_IRQ;
	uport.iotype	= UPIO_MEM;
	uport.membase	= iomem_base;
	memset(&uart, 0, sizeof(uart));
	uart.port.irq		= sp->irq;
	uart.port.uartclk	= 3686400;
	uart.port.flags		= UPF_SHARE_IRQ;
	uart.port.iotype	= UPIO_MEM;
	uart.port.membase	= iomem_base;

	sp->serial_line = serial8250_register_port(&uport);
	sp->serial_line = serial8250_register_8250_port(&uart);
	if (sp->serial_line < 0) {
		dev_err(sp->dev, "Failed to register serial port\n");
		return;
+12 −10
Original line number Diff line number Diff line
@@ -1147,7 +1147,8 @@ static void __devinit ioc3_8250_register(struct ioc3_uartregs __iomem *uart)
{
#define COSMISC_CONSTANT 6

	struct uart_port port = {
	struct uart_8250_port port = {
	        .port = {
			.irq		= 0,
			.flags		= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
			.iotype		= UPIO_MEM,
@@ -1156,6 +1157,7 @@ static void __devinit ioc3_8250_register(struct ioc3_uartregs __iomem *uart)

			.membase	= (unsigned char __iomem *) uart,
			.mapbase	= (unsigned long) uart,
                }
	};
	unsigned char lcr;

@@ -1164,7 +1166,7 @@ static void __devinit ioc3_8250_register(struct ioc3_uartregs __iomem *uart)
	uart->iu_scr = COSMISC_CONSTANT,
	uart->iu_lcr = lcr;
	uart->iu_lcr;
	serial8250_register_port(&port);
	serial8250_register_8250_port(&port);
}

static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3)
+0 −30
Original line number Diff line number Diff line
@@ -13,36 +13,6 @@

#include <linux/serial_8250.h>

struct uart_8250_port {
	struct uart_port	port;
	struct timer_list	timer;		/* "no irq" timer */
	struct list_head	list;		/* ports on this IRQ */
	unsigned short		capabilities;	/* port capabilities */
	unsigned short		bugs;		/* port bugs */
	unsigned int		tx_loadsz;	/* transmit fifo load size */
	unsigned char		acr;
	unsigned char		ier;
	unsigned char		lcr;
	unsigned char		mcr;
	unsigned char		mcr_mask;	/* mask of user bits */
	unsigned char		mcr_force;	/* mask of forced bits */
	unsigned char		cur_iotype;	/* Running I/O type */

	/*
	 * Some bits in registers are cleared on a read, so they must
	 * be saved whenever the register is read but the bits will not
	 * be immediately processed.
	 */
#define LSR_SAVE_FLAGS UART_LSR_BRK_ERROR_BITS
	unsigned char		lsr_saved_flags;
#define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA
	unsigned char		msr_saved_flags;

	/* 8250 specific callbacks */
	int			(*dl_read)(struct uart_8250_port *);
	void			(*dl_write)(struct uart_8250_port *, int);
};

struct old_serial_port {
	unsigned int uart;
	unsigned int baud_base;
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ static int __devinit dw8250_probe(struct platform_device *pdev)
		dev_err(&pdev->dev, "no clock-frequency property set\n");
		return -EINVAL;
	}
	uart.uart.port.uartclk = val;
	uart.port.uartclk = val;

	data->line = serial8250_register_8250_port(&uart);
	if (data->line < 0)
Loading