Skip to content

Commit

Permalink
tty/serial: at91: fix uart/usart selection for older products
Browse files Browse the repository at this point in the history
Since commit 055560b (serial: at91:
distinguish usart and uart) the older products which do not have a
name field in their register map are unable to use their serial output.
As the main console output is usually the serial interface (aka DBGU) it
is pretty unfortunate.
So, instead of failing during probe() we just silently configure the serial
peripheral as an uart. It allows us to use these serial outputs.
The proper solution is proposed in another patch.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Nicolas Ferre authored and Greg Kroah-Hartman committed Oct 17, 2013
1 parent d969de8 commit 6e757ad
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/tty/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ static void atmel_set_ops(struct uart_port *port)
/*
* Get ip name usart or uart
*/
static int atmel_get_ip_name(struct uart_port *port)
static void atmel_get_ip_name(struct uart_port *port)
{
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
int name = UART_GET_IP_NAME(port);
Expand All @@ -1518,10 +1518,7 @@ static int atmel_get_ip_name(struct uart_port *port)
atmel_port->is_usart = false;
} else {
dev_err(port->dev, "Not supported ip name, set to uart\n");
return -EINVAL;
}

return 0;
}

/*
Expand Down Expand Up @@ -2405,9 +2402,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
/*
* Get port name of usart or uart
*/
ret = atmel_get_ip_name(&port->uart);
if (ret < 0)
goto err_add_port;
atmel_get_ip_name(&port->uart);

return 0;

Expand Down

0 comments on commit 6e757ad

Please sign in to comment.