diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-25 02:25:49 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-25 02:25:49 +0400 |
commit | 9a234349de01de3437784c0ef03d95353f055fae (patch) | |
tree | 2a0be0a9144d49f7d03d173e3e8fca2f3e1e8a50 | |
parent | 0b37004dd0113db3b23840b4fd8835dae2395acc (diff) | |
download | linux-9a234349de01de3437784c0ef03d95353f055fae.tar.xz |
Revert "tty: serial8250: add helpers for the DesignWare 8250"
This reverts commit 6b1a98d1c4851235d9b6764b3f7b7db7909fc760.
It causes a build error that needs to be resolved differently.
Cc: Alan Cox <alan@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/tty/serial/8250_dw.c | 99 | ||||
-rw-r--r-- | drivers/tty/serial/Kconfig | 7 | ||||
-rw-r--r-- | drivers/tty/serial/Makefile | 1 | ||||
-rw-r--r-- | include/linux/serial_8250.h | 8 |
4 files changed, 0 insertions, 115 deletions
diff --git a/drivers/tty/serial/8250_dw.c b/drivers/tty/serial/8250_dw.c deleted file mode 100644 index e25782aeec7a..000000000000 --- a/drivers/tty/serial/8250_dw.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Synopsys DesignWare specific 8250 operations. - * - * Copyright 2011 Picochip, Jamie Iles. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * The Synopsys DesignWare 8250 has an extra feature whereby it detects if the - * LCR is written whilst busy. If it is, then a busy detect interrupt is - * raised, the LCR needs to be rewritten and the uart status register read. - */ -#include <linux/io.h> -#include <linux/serial_8250.h> -#include <linux/serial_core.h> -#include <linux/serial_reg.h> -#include <linux/slab.h> - -struct dw8250_data { - int last_lcr; -}; - -static void dw8250_serial_out(struct uart_port *p, int offset, int value) -{ - struct dw8250_data *d = p->private_data; - - if (offset == UART_LCR) - d->last_lcr = value; - - offset <<= p->regshift; - writeb(value, p->membase + offset); -} - -static unsigned int dw8250_serial_in(struct uart_port *p, int offset) -{ - offset <<= p->regshift; - - return readb(p->membase + offset); -} - -static void dw8250_serial_out32(struct uart_port *p, int offset, - int value) -{ - struct dw8250_data *d = p->private_data; - - if (offset == UART_LCR) - d->last_lcr = value; - - offset <<= p->regshift; - writel(value, p->membase + offset); -} - -static unsigned int dw8250_serial_in32(struct uart_port *p, int offset) -{ - offset <<= p->regshift; - - return readl(p->membase + offset); -} - -/* Offset for the DesignWare's UART Status Register. */ -#define UART_USR 0x1f - -static int dw8250_handle_irq(struct uart_port *p) -{ - struct dw8250_data *d = p->private_data; - unsigned int iir = p->serial_in(p, UART_IIR); - - if (serial8250_handle_irq(p, iir)) { - return 1; - } else if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) { - /* Clear the USR and write the LCR again. */ - (void)p->serial_in(p, UART_USR); - p->serial_out(p, d->last_lcr, UART_LCR); - - return 1; - } - - return 0; -} - -int serial8250_use_designware_io(struct uart_port *up) -{ - up->private_data = kzalloc(sizeof(struct dw8250_data), GFP_KERNEL); - if (!up->private_data) - return -ENOMEM; - - if (up->iotype == UPIO_MEM32) { - up->serial_out = dw8250_serial_out32; - up->serial_in = dw8250_serial_in32; - } else { - up->serial_out = dw8250_serial_out; - up->serial_in = dw8250_serial_in; - } - up->handle_irq = dw8250_handle_irq; - - return 0; -} diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index d2d1cc2329b7..a9b307f582e1 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -267,13 +267,6 @@ config SERIAL_8250_RM9K port hardware found on MIPS RM9122 and similar processors. If unsure, say N. -config SERIAL_8250_DW - bool "Support for Synopsys DesignWare 8250 quirks" - depends on SERIAL_8250 - help - Selecting this option will enable handling of the extra features - present in the Synopsys DesignWare APB UART. - comment "Non-8250 serial port support" config SERIAL_AMBA_PL010 diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile index 7b59958f50ec..78748136ccc8 100644 --- a/drivers/tty/serial/Makefile +++ b/drivers/tty/serial/Makefile @@ -28,7 +28,6 @@ obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o -obj-$(CONFIG_SERIAL_8250_DW) += 8250_dw.o obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 09e2dbcd7ca3..1f05bbeac01e 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -86,13 +86,5 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir); extern void serial8250_set_isa_configurator(void (*v) (int port, struct uart_port *up, unsigned short *capabilities)); -#ifndef SERIAL_8250_DW -extern int serial8250_use_designware_io(struct uart_port *up); -#else -static inline int serial8250_use_designware_io(struct uart_port *up) -{ - return -EIO; -} -#endif #endif |