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:
parent
e48bc56b11
commit
f1caf676ca
1 changed files with 2 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue