diff options
author | Tom Rini <trini@konsulko.com> | 2022-05-18 08:41:13 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-05-18 08:41:13 -0400 |
commit | f83bd23e2a0e9861969c9d43395299a14f25ddda (patch) | |
tree | 4162cf0f8322889c9f287f2415569032ab952af4 /drivers | |
parent | c387e62614713d0cc9e3ed022b86c9f320b02853 (diff) | |
parent | f9ec791b5e24378b71590877499f8683d5f54dac (diff) | |
download | u-boot-f83bd23e2a0e9861969c9d43395299a14f25ddda.zip u-boot-f83bd23e2a0e9861969c9d43395299a14f25ddda.tar.gz u-boot-f83bd23e2a0e9861969c9d43395299a14f25ddda.tar.bz2 |
Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/18May2022
- Misc Kconfig cleanups (Chris & Pali)
- turris_omnia: Fix hangup in debug UART (this introduces
TPL/SPL_DEBUG_UART_BASE) Pali
- mvebu: uDPU: include fixed-phy support (Robert)
- pinctrl: probe pinctrl drivers during post-bind (Robert)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pinctrl/pinctrl-uclass.c | 7 | ||||
-rw-r--r-- | drivers/serial/Kconfig | 14 | ||||
-rw-r--r-- | drivers/serial/ns16550.c | 4 |
3 files changed, 23 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 4462ed2..38ce2b5 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -402,6 +402,13 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev) { const struct pinctrl_ops *ops = pinctrl_get_ops(dev); + /* + * Make sure that the pinctrl driver gets probed after binding + * as some pinctrl drivers also register the GPIO driver during + * probe, and if they are not probed GPIO-s are not registered. + */ + dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); + if (!ops) { dev_dbg(dev, "ops is not set. Do not bind.\n"); return -EINVAL; diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 26fa498..f6425a5 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -508,6 +508,20 @@ config DEBUG_UART_BASE A default should be provided by your board, but if not you will need to use the correct value here. +config SPL_DEBUG_UART_BASE + hex "Base address of UART for SPL" + depends on SPL && DEBUG_UART + default DEBUG_UART_BASE + help + This is the base address of your UART for memory-mapped UARTs for SPL. + +config TPL_DEBUG_UART_BASE + hex "Base address of UART for TPL" + depends on TPL && DEBUG_UART + default DEBUG_UART_BASE + help + This is the base address of your UART for memory-mapped UARTs for TPL. + config DEBUG_UART_CLOCK int "UART input clock" depends on DEBUG_UART diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index a4220fd..78bfe62 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -325,7 +325,7 @@ int ns16550_tstc(struct ns16550 *com_port) static inline void _debug_uart_init(void) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; + struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); int baud_divisor; /* @@ -360,7 +360,7 @@ static inline int NS16550_read_baud_divisor(struct ns16550 *com_port) static inline void _debug_uart_putc(int ch) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; + struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) { #ifdef CONFIG_DEBUG_UART_NS16550_CHECK_ENABLED |