]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
serial: ralink: adds support for the serial core found on ralink wisoc
authorJohn Crispin <blogic@openwrt.org>
Fri, 25 Jan 2013 18:39:51 +0000 (19:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jan 2013 05:15:34 +0000 (00:15 -0500)
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 <blogic@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250.c
drivers/tty/serial/8250/Kconfig
include/linux/serial_core.h

index 24939ca3eedc7ed66dbd20e18d79a2d7abecf108..0efc815a496869fbe80cec247fb99af9286105f9 100644 (file)
@@ -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;
index d31f4c63d4badf165991f437360e2ade1a9ffafb..2ef9537bcb2cda6a985d27f9dda8c3385187fe3a 100644 (file)
@@ -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.
index 82aebc8ff77f2c26e8e185fe6ad8d31bb7d13b14..d97142159e0f0765a87de2b30d764c0b72228da3 100644 (file)
@@ -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 */