diff options
| author | John Crispin <blogic@openwrt.org> | 2013-01-25 13:39:51 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-30 00:15:34 -0500 |
| commit | c420811f117a59a4a7d4e34b362437b91c7fafa1 (patch) | |
| tree | d7085982248f5347c65da5977a3dfd79eefb3ef6 | |
| parent | 9fe8074b82ed14358be50c62ab9d081bcb911607 (diff) | |
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 <blogic@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/tty/serial/8250/8250.c | 6 | ||||
| -rw-r--r-- | drivers/tty/serial/8250/Kconfig | 8 | ||||
| -rw-r--r-- | 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 24939ca3eedc..0efc815a4968 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) | |||
| 317 | serial_out(up, UART_DLM, value >> 8 & 0xff); | 317 | serial_out(up, UART_DLM, value >> 8 & 0xff); |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | #ifdef CONFIG_MIPS_ALCHEMY | 320 | #if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X) |
| 321 | 321 | ||
| 322 | /* Au1x00 UART hardware has a weird register layout */ | 322 | /* Au1x00/RT288x UART hardware has a weird register layout */ |
| 323 | static const u8 au_io_in_map[] = { | 323 | static const u8 au_io_in_map[] = { |
| 324 | [UART_RX] = 0, | 324 | [UART_RX] = 0, |
| 325 | [UART_IER] = 2, | 325 | [UART_IER] = 2, |
| @@ -440,7 +440,7 @@ static void set_io_from_upio(struct uart_port *p) | |||
| 440 | p->serial_out = mem32_serial_out; | 440 | p->serial_out = mem32_serial_out; |
| 441 | break; | 441 | break; |
| 442 | 442 | ||
| 443 | #ifdef CONFIG_MIPS_ALCHEMY | 443 | #if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X) |
| 444 | case UPIO_AU: | 444 | case UPIO_AU: |
| 445 | p->serial_in = au_serial_in; | 445 | p->serial_in = au_serial_in; |
| 446 | p->serial_out = au_serial_out; | 446 | p->serial_out = au_serial_out; |
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig index d31f4c63d4ba..2ef9537bcb2c 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig | |||
| @@ -276,3 +276,11 @@ config SERIAL_8250_EM | |||
| 276 | Selecting this option will add support for the integrated serial | 276 | Selecting this option will add support for the integrated serial |
| 277 | port hardware found on the Emma Mobile line of processors. | 277 | port hardware found on the Emma Mobile line of processors. |
| 278 | If unsure, say N. | 278 | If unsure, say N. |
| 279 | |||
| 280 | config SERIAL_8250_RT288X | ||
| 281 | bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support" | ||
| 282 | depends on SERIAL_8250 && (SOC_RT288X || SOC_RT305X || SOC_RT3883) | ||
| 283 | help | ||
| 284 | If you have a Ralink RT288x/RT305x SoC based board and want to use the | ||
| 285 | serial port, say Y to this option. The driver can handle up to 2 serial | ||
| 286 | ports. If unsure, say N. | ||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 82aebc8ff77f..d97142159e0f 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -134,7 +134,7 @@ struct uart_port { | |||
| 134 | #define UPIO_HUB6 (1) | 134 | #define UPIO_HUB6 (1) |
| 135 | #define UPIO_MEM (2) | 135 | #define UPIO_MEM (2) |
| 136 | #define UPIO_MEM32 (3) | 136 | #define UPIO_MEM32 (3) |
| 137 | #define UPIO_AU (4) /* Au1x00 type IO */ | 137 | #define UPIO_AU (4) /* Au1x00 and RT288x type IO */ |
| 138 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ | 138 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ |
| 139 | 139 | ||
| 140 | unsigned int read_status_mask; /* driver specific */ | 140 | unsigned int read_status_mask; /* driver specific */ |
