From 6bb6cbe60011dd33b8ff9f6b6058fb644548b088 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 3 Apr 2013 09:59:10 +0000 Subject: [ramips] add patches for v3.8 Signed-off-by: John Crsipin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36163 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...nk-adds-support-for-the-serial-core-found.patch | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 target/linux/ramips/patches-3.8/0015-serial-ralink-adds-support-for-the-serial-core-found.patch (limited to 'target/linux/ramips/patches-3.8/0015-serial-ralink-adds-support-for-the-serial-core-found.patch') diff --git a/target/linux/ramips/patches-3.8/0015-serial-ralink-adds-support-for-the-serial-core-found.patch b/target/linux/ramips/patches-3.8/0015-serial-ralink-adds-support-for-the-serial-core-found.patch new file mode 100644 index 0000000000..ae686d859e --- /dev/null +++ b/target/linux/ramips/patches-3.8/0015-serial-ralink-adds-support-for-the-serial-core-found.patch @@ -0,0 +1,74 @@ +From c420811f117a59a4a7d4e34b362437b91c7fafa1 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 25 Jan 2013 19:39:51 +0100 +Subject: [PATCH] serial: ralink: adds support for the serial core found on + ralink wisoc + +The MIPS based Ralink WiSoC platform has 1 or more 8250 compatible serial cores. +To make them work we require the same quirks that are used by AU1x00. + +Signed-off-by: John Crispin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/8250/8250.c | 6 +++--- + drivers/tty/serial/8250/Kconfig | 8 ++++++++ + include/linux/serial_core.h | 2 +- + 3 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c +index 24939ca..0efc815 100644 +--- a/drivers/tty/serial/8250/8250.c ++++ b/drivers/tty/serial/8250/8250.c +@@ -317,9 +317,9 @@ static void default_serial_dl_write(struct uart_8250_port *up, int value) + serial_out(up, UART_DLM, value >> 8 & 0xff); + } + +-#ifdef CONFIG_MIPS_ALCHEMY ++#if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X) + +-/* Au1x00 UART hardware has a weird register layout */ ++/* Au1x00/RT288x UART hardware has a weird register layout */ + static const u8 au_io_in_map[] = { + [UART_RX] = 0, + [UART_IER] = 2, +@@ -440,7 +440,7 @@ static void set_io_from_upio(struct uart_port *p) + p->serial_out = mem32_serial_out; + break; + +-#ifdef CONFIG_MIPS_ALCHEMY ++#if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X) + case UPIO_AU: + p->serial_in = au_serial_in; + p->serial_out = au_serial_out; +diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig +index d31f4c6..2ef9537 100644 +--- a/drivers/tty/serial/8250/Kconfig ++++ b/drivers/tty/serial/8250/Kconfig +@@ -276,3 +276,11 @@ config SERIAL_8250_EM + Selecting this option will add support for the integrated serial + port hardware found on the Emma Mobile line of processors. + If unsure, say N. ++ ++config SERIAL_8250_RT288X ++ bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support" ++ depends on SERIAL_8250 && (SOC_RT288X || SOC_RT305X || SOC_RT3883) ++ help ++ If you have a Ralink RT288x/RT305x SoC based board and want to use the ++ serial port, say Y to this option. The driver can handle up to 2 serial ++ ports. If unsure, say N. +diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h +index 82aebc8..d971421 100644 +--- a/include/linux/serial_core.h ++++ b/include/linux/serial_core.h +@@ -134,7 +134,7 @@ struct uart_port { + #define UPIO_HUB6 (1) + #define UPIO_MEM (2) + #define UPIO_MEM32 (3) +-#define UPIO_AU (4) /* Au1x00 type IO */ ++#define UPIO_AU (4) /* Au1x00 and RT288x type IO */ + #define UPIO_TSI (5) /* Tsi108/109 type IO */ + + unsigned int read_status_mask; /* driver specific */ +-- +1.7.10.4 + -- cgit v1.2.3