diff mbox

tty/serial: atmel: increase ATMEL_MAX_UART

Message ID 20170221120357.13623-1-alexandre.belloni@free-electrons.com
State New
Headers show

Commit Message

Alexandre Belloni Feb. 21, 2017, 12:03 p.m. UTC
The samx7 family uses the same UART/USART IP as the at91/sama5 families but
has 8 of those.

Suggested-by: Szemző András <sza@esh.hu>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/tty/serial/atmel_serial.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Genoud Feb. 21, 2017, 12:46 p.m. UTC | #1
2017-02-21 13:03 GMT+01:00 Alexandre Belloni
<alexandre.belloni@free-electrons.com>:
> The samx7 family uses the same UART/USART IP as the at91/sama5 families but
> has 8 of those.
>
> Suggested-by: Szemző András <sza@esh.hu>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>

> ---
>  drivers/tty/serial/atmel_serial.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index f0d4894267c2..8cc152e67bfb 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -119,8 +119,9 @@ struct atmel_uart_char {
>  /*
>   * at91: 6 USARTs and one DBGU port (SAM9260)
>   * avr32: 4
> + * samx7: 3 USARTs and 5 UARTs
>   */
> -#define ATMEL_MAX_UART         7
> +#define ATMEL_MAX_UART         8
>
>  /*
>   * We wrap our port structure around the generic uart_port.
> --
> 2.11.0
>

Thanks !
Richard Genoud Feb. 21, 2017, 1 p.m. UTC | #2
2017-02-21 13:03 GMT+01:00 Alexandre Belloni
<alexandre.belloni@free-electrons.com>:
> struct cache is only used in suspend/resume. Exclude it when PM is not
> selected.
>
> Suggested-by: Richard Genoud <richard.genoud@gmail.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
> ---
>  drivers/tty/serial/atmel_serial.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index dcebb28ffbc4..f0d4894267c2 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -175,6 +175,7 @@ struct atmel_uart_port {
>         unsigned int            pending_status;
>         spinlock_t              lock_suspended;
>
> +#ifdef CONFIG_PM
>         struct {
>                 u32             cr;
>                 u32             mr;
> @@ -185,6 +186,7 @@ struct atmel_uart_port {
>                 u32             fmr;
>                 u32             fimr;
>         } cache;
> +#endif
>
>         int (*prepare_rx)(struct uart_port *port);
>         int (*prepare_tx)(struct uart_port *port);
> --
> 2.11.0
>

Thanks !
diff mbox

Patch

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index f0d4894267c2..8cc152e67bfb 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -119,8 +119,9 @@  struct atmel_uart_char {
 /*
  * at91: 6 USARTs and one DBGU port (SAM9260)
  * avr32: 4
+ * samx7: 3 USARTs and 5 UARTs
  */
-#define ATMEL_MAX_UART		7
+#define ATMEL_MAX_UART		8
 
 /*
  * We wrap our port structure around the generic uart_port.