Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238085 > unrolled thread
| Started by | Mans Rullgard <mans@mansr.com> |
|---|---|
| First post | 2015-10-02 12:20 +0200 |
| Last post | 2015-10-06 10:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[RESEND][PATCH] serial: 8250: simplify ralink/alchemy register remap selection Mans Rullgard <mans@mansr.com> - 2015-10-02 12:20 +0200
Re: [RESEND][PATCH] serial: 8250: simplify ralink/alchemy register remap selection Mason <slash.tmp@free.fr> - 2015-10-06 10:40 +0200
| From | Mans Rullgard <mans@mansr.com> |
|---|---|
| Date | 2015-10-02 12:20 +0200 |
| Subject | [RESEND][PATCH] serial: 8250: simplify ralink/alchemy register remap selection |
| Message-ID | <qf5Bv-ps-1@gated-at.bofh.it> |
Some SoCs, including Ralink/Mediatek and Alchemy Au1xxx, have a
16550-like UART with a non-standard register layout. These are
supported by a simple mapping table in 8250_port.c Rather than
list every SoC type using this access mode in the ifdefs there,
allow selecting the SERIAL_8250_RT288X Kconfig option with any
system and default it to y for the known cases needing it. The
help text is reworded accordingly.
This change simplifies adding support for other SoCs also using
the same UART.
The name of the option is a little misleading, but not knowing
the true origin of this UART, it is as good a choice as any.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
drivers/tty/serial/8250/8250_port.c | 4 ++--
drivers/tty/serial/8250/Kconfig | 9 +++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 54e6c8d..a2ff31c 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -276,7 +276,7 @@ static void default_serial_dl_write(struct uart_8250_port *up, int value)
serial_out(up, UART_DLM, value >> 8 & 0xff);
}
-#if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X)
+#ifdef CONFIG_SERIAL_8250_RT288X
/* Au1x00/RT288x UART hardware has a weird register layout */
static const s8 au_io_in_map[8] = {
@@ -427,7 +427,7 @@ static void set_io_from_upio(struct uart_port *p)
p->serial_out = mem32be_serial_out;
break;
-#if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X)
+#ifdef 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 e1de118..a51c75c 100644
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -294,11 +294,12 @@ config SERIAL_8250_EM
config SERIAL_8250_RT288X
bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support"
- depends on SERIAL_8250 && (SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620)
+ depends on SERIAL_8250
+ default y if MIPS_ALCHEMY || SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620
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.
+ Selecting this option will add support for the alternate register
+ layout used by Ralink RT288x/RT305x, Alchemy Au1xxx, and some others.
+ If unsure, say N.
config SERIAL_8250_OMAP
tristate "Support for OMAP internal UART (8250 based driver)"
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mason <slash.tmp@free.fr> |
|---|---|
| Date | 2015-10-06 10:40 +0200 |
| Subject | Re: [RESEND][PATCH] serial: 8250: simplify ralink/alchemy register remap selection |
| Message-ID | <qgvWW-S5-7@gated-at.bofh.it> |
| In reply to | #1238085 |
On 02/10/2015 12:15, Mans Rullgard wrote:
> Some SoCs, including Ralink/Mediatek and Alchemy Au1xxx, have a
> 16550-like UART with a non-standard register layout. These are
> supported by a simple mapping table in 8250_port.c Rather than
> list every SoC type using this access mode in the ifdefs there,
> allow selecting the SERIAL_8250_RT288X Kconfig option with any
> system and default it to y for the known cases needing it. The
> help text is reworded accordingly.
>
> This change simplifies adding support for other SoCs also using
> the same UART.
I approve this change, as my platform (Sigma Designs Tango4) uses
this UART.
> The name of the option is a little misleading, but not knowing
> the true origin of this UART, it is as good a choice as any.
Now that you know the UART is probably a Palmchip IP block, would
it make sense to rename the CONFIG option?
(CONFIG_SERIAL_8250_PALMCHIP?)
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
> drivers/tty/serial/8250/8250_port.c | 4 ++--
> drivers/tty/serial/8250/Kconfig | 9 +++++----
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index 54e6c8d..a2ff31c 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -276,7 +276,7 @@ static void default_serial_dl_write(struct uart_8250_port *up, int value)
> serial_out(up, UART_DLM, value >> 8 & 0xff);
> }
>
> -#if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X)
> +#ifdef CONFIG_SERIAL_8250_RT288X
>
> /* Au1x00/RT288x UART hardware has a weird register layout */
> static const s8 au_io_in_map[8] = {
> @@ -427,7 +427,7 @@ static void set_io_from_upio(struct uart_port *p)
> p->serial_out = mem32be_serial_out;
> break;
>
> -#if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X)
> +#ifdef 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 e1de118..a51c75c 100644
> --- a/drivers/tty/serial/8250/Kconfig
> +++ b/drivers/tty/serial/8250/Kconfig
> @@ -294,11 +294,12 @@ config SERIAL_8250_EM
>
> config SERIAL_8250_RT288X
> bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support"
> - depends on SERIAL_8250 && (SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620)
> + depends on SERIAL_8250
> + default y if MIPS_ALCHEMY || SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620
> 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.
> + Selecting this option will add support for the alternate register
> + layout used by Ralink RT288x/RT305x, Alchemy Au1xxx, and some others.
> + If unsure, say N.
>
> config SERIAL_8250_OMAP
> tristate "Support for OMAP internal UART (8250 based driver)"
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web