drivers/serial: Fix uart issues for i.MX7 and i.MX6

This patch fixes the uart isr calling the callback with wrong data
(#11465) and the uart_poll_in checking the wrong status flag.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
This commit is contained in:
Diego Sueiro 2018-11-30 17:32:05 +00:00 committed by Anas Nashif
commit f1caf676ca

View file

@ -107,7 +107,7 @@ static int uart_imx_poll_in(struct device *dev, unsigned char *c)
{
UART_Type *uart = UART_STRUCT(dev);
while (!UART_GetStatusFlag(uart, uartStatusRxReady))
while (!UART_GetStatusFlag(uart, uartStatusRxDataReady))
;
*c = UART_Getchar(uart);
@ -254,7 +254,7 @@ void uart_imx_isr(void *arg)
struct imx_uart_data *data = dev->driver_data;
if (data->callback) {
data->callback(dev);
data->callback(data->cb_data);
}
}
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */