Skip to content

Commit f1caf67

Browse files
diegosueironashif
authored andcommitted
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 <[email protected]>
1 parent e48bc56 commit f1caf67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/serial/uart_imx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static int uart_imx_poll_in(struct device *dev, unsigned char *c)
107107
{
108108
UART_Type *uart = UART_STRUCT(dev);
109109

110-
while (!UART_GetStatusFlag(uart, uartStatusRxReady))
110+
while (!UART_GetStatusFlag(uart, uartStatusRxDataReady))
111111
;
112112
*c = UART_Getchar(uart);
113113

@@ -254,7 +254,7 @@ void uart_imx_isr(void *arg)
254254
struct imx_uart_data *data = dev->driver_data;
255255

256256
if (data->callback) {
257-
data->callback(dev);
257+
data->callback(data->cb_data);
258258
}
259259
}
260260
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */

0 commit comments

Comments
 (0)