6
6
*/
7
7
8
8
#include <drivers/uart.h>
9
+ #include <drivers/reset.h>
9
10
#include <drivers/pinctrl.h>
10
11
11
12
/* pico-sdk includes */
@@ -17,6 +18,7 @@ struct uart_rpi_config {
17
18
uart_inst_t * const uart_dev ;
18
19
uart_hw_t * const uart_regs ;
19
20
const struct pinctrl_dev_config * pcfg ;
21
+ const struct reset_dt_spec reset ;
20
22
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
21
23
uart_irq_config_func_t irq_config_func ;
22
24
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
@@ -70,7 +72,7 @@ static int uart_rpi_init(const struct device *dev)
70
72
71
73
/*
72
74
* uart_init() may be replaced by register based API once rpi-pico platform
73
- * has a clock controller driver and a reset controller driver
75
+ * has a clock controller driver
74
76
*/
75
77
baudrate = uart_init (uart_inst , data -> baudrate );
76
78
/* Check if baudrate adjustment returned by 'uart_init' function is a positive value */
@@ -302,6 +304,7 @@ static const struct uart_driver_api uart_rpi_driver_api = {
302
304
.uart_dev = uart##idx, \
303
305
.uart_regs = (uart_hw_t *)uart##idx, \
304
306
.pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(idx), \
307
+ .reset = RESET_DT_SPEC_INST_GET(idx), \
305
308
RPI_UART_IRQ_CONFIG_INIT(idx), \
306
309
}; \
307
310
\
0 commit comments