u-boot/drivers/serial
Pali Rohár 5db5815e99 serial: a37xx: Reset whole UART when changing parent clock from TBG to XTAL
Sometimes UART stops transmitting characters after UART clock is changed
back to XTAL. In this state UART fifo is always full. Kernel during early
boot wants to print output on UART and is waiting for non-empty UART fifo.
Which leads to CPU hangup without any (debug) output on UART.

Marvell Armada 3700 Functional Specifications says that for programming
fractional divisor registers it is required to disable UART, enable
loopback mode, reset fifos, program registers, disable loopback mode,
release reset of fifos and enable UART.

But these steps do not fix above mentioned issue that UART hangup. Also
gating UART clock does not help. And even resetting UART state machines do
not help.

Experiments showed that UART fifo is unblocked after board is being reset
(during board reset UART HW transmit UART fifo even CPU is not executing
kernel/bootloader anymore).

And another experiments showed that same workaround can be achieved also
by external reset of UART HW (without need to reset board).

So do not implement any of "Marvell recommended" steps from Functional
Specifications as they do not work. And rather prior changing parent clock
back to XTAL, do external reset of UART HW. This operation also resets all
UART registers, so basically it also sets UART clock to default, which is
XTAL. It is unknown why UART hangups and enters such broken state.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-11-30 08:31:04 +01:00
..
altera_jtag_uart.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
altera_uart.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
arm_dcc.c serial: Remove DM_FLAG_PRE_RELOC flag in various drivers 2018-11-14 09:16:28 -08:00
atmel_usart.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
atmel_usart.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig serial: qcom: add support for GENI serial driver 2021-10-31 08:46:44 -04:00
lpc32xx_hsuart.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
Makefile serial: qcom: add support for GENI serial driver 2021-10-31 08:46:44 -04:00
ns16550.c ti: keystone: Move away from CONFIG_SOC_KEYSTONE 2021-09-27 21:38:34 -04:00
sandbox.c treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
serial-uclass.c - Disable ATAGS for STM32 MCU and MPU boards 2021-10-12 12:01:00 -04:00
serial.c global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
serial_ar933x.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_arc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_bcm283x_mu.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial_bcm283x_pl011.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial_bcm6345.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_coreboot.c x86: Make coreboot sysinfo available to any x86 board 2021-03-27 13:59:37 +13:00
serial_cortina.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
serial_efi.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_intel_mid.c serial: Update NS16550_t and struct NS16550 2021-01-05 12:24:40 -07:00
serial_linflexuart.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_lpuart.c serial: lpuart: add new compatible fsl, ls1028a-lpuart 2021-11-09 17:18:23 +05:30
serial_mcf.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_meson.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
serial_mpc8xx.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_msm.c WS cleanup: remove trailing white space 2021-09-30 08:08:56 -04:00
serial_msm_geni.c serial: qcom: add support for GENI serial driver 2021-10-31 08:46:44 -04:00
serial_mt7620.c treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
serial_mtk.c serial: mtk: rewrite the setbrg function 2021-03-20 16:24:27 -04:00
serial_mvebu_a3700.c serial: a37xx: Reset whole UART when changing parent clock from TBG to XTAL 2021-11-30 08:31:04 +01:00
serial_mxc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_ns16550.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_nulldev.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
serial_octeon_bootcmd.c serial: serial_octeon_bootcmd.c: Add PCI remote console support 2021-04-23 21:22:55 +02:00
serial_octeon_pcie_console.c serial: serial_octeon_pcie_console.c: Add PCI remote console support 2021-04-23 21:22:55 +02:00
serial_omap.c treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
serial_owl.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
serial_pic32.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_pl01x.c serial: pl011: Enable DEBUG_UART_PL011 in SPL 2021-07-24 08:57:53 -04:00
serial_pl01x_internal.h dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
serial_pxa.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_rockchip.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
serial_s5p.c serial: samsung: add support for skip debug init in s5p 2021-10-31 11:25:39 -04:00
serial_sbi.c serial: Add a debug console using the RISC-V SBI interface 2021-10-07 16:08:23 +08:00
serial_sh.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
serial_sh.h sh: sh3: Remove CPU support 2019-05-10 22:43:18 +02:00
serial_sifive.c Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
serial_sti_asc.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
serial_stm32.c serial: stm32: define LOG_CATEGORY 2021-01-13 09:52:58 +01:00
serial_stm32.h dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
serial_uniphier.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
serial_xen.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
serial_xuartlite.c Xilinx changes for v2021.04 2021-01-06 07:57:33 -05:00
serial_zynq.c serial: zynq: Add support for serial parameters 2021-06-28 08:56:03 +02:00
usbtty.c serial: usbtty: Send urb data in correct order 2021-03-03 04:12:45 +01:00
usbtty.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00