drivers: serial: uart_miv: Fix build errors

If we try and build the MiV uart driver with interrupt support enabled
we get some errors related to code that hasn't been updated.  Fix the
compile errors and add SERIAL_SUPPORT_INTERRUPT to the Kconfig to
hopefully catch these issues in the future

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2021-05-10 06:02:02 -05:00 committed by Kumar Gala
commit 706de953ab
2 changed files with 3 additions and 3 deletions

View file

@ -7,5 +7,6 @@ config UART_MIV
bool "Mi-V serial driver"
depends on SOC_RISCV32_MIV
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
help
This option enables the Mi-V serial driver.

View file

@ -295,9 +295,8 @@ static int uart_miv_irq_update(const struct device *dev)
return 1;
}
static void uart_miv_irq_handler(void *arg)
static void uart_miv_irq_handler(const struct device *dev)
{
const struct device *dev = (const struct device *)arg;
struct uart_miv_data *data = DEV_DATA(dev);
if (data->callback) {
@ -329,7 +328,7 @@ void uart_miv_rx_thread(void *arg1, void *arg2, void *arg3)
if (uart->status & STATUS_RXFULL_MASK) {
uart_miv_irq_handler(dev);
}
k_sleep(delay);
k_sleep(K_USEC(delay));
}
}