diff options
author | Tom Rini <trini@konsulko.com> | 2021-11-30 08:59:22 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-11-30 08:59:22 -0500 |
commit | 4a14bfffd42f968ed9d72a780a8d44a9053c5b95 (patch) | |
tree | 2270caa331e5216907f6701d8dd1718740ae1719 /drivers | |
parent | ca819284d35e7b8ed18995ddc78677d8b4d14154 (diff) | |
parent | 5db5815e997ae8cf0a3bba6a25652d8b6fd5edd1 (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- turris_omnia: enable A385 watchdog before disabling MCU watchdog
(Pali)
- a37xx: Reset whole UART when changing parent clock from TBG to XTAL
(Pali)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/serial_mvebu_a3700.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial/serial_mvebu_a3700.c index 6bca8e4b7e2..93e4d38d34c 100644 --- a/drivers/serial/serial_mvebu_a3700.c +++ b/drivers/serial/serial_mvebu_a3700.c @@ -9,6 +9,7 @@ #include <serial.h> #include <asm/io.h> #include <asm/arch/cpu.h> +#include <mach/soc.h> struct mvebu_plat { void __iomem *base; @@ -213,6 +214,7 @@ static int mvebu_serial_remove(struct udevice *dev) u32 new_oversampling; u32 oversampling; u32 d1, d2; + u32 nb_rst; /* * Switch UART base clock back to XTAL because older Linux kernel @@ -260,12 +262,22 @@ static int mvebu_serial_remove(struct udevice *dev) return 0; } + /* wait until TX empty */ while (!(readl(base + UART_STATUS_REG) & UART_STATUS_TX_EMPTY)) ; + /* external reset of UART via North Bridge Peripheral */ + nb_rst = readl(MVEBU_REGISTER(0x12400)); + writel(nb_rst & ~BIT(3), MVEBU_REGISTER(0x12400)); + writel(nb_rst | BIT(3), MVEBU_REGISTER(0x12400)); + + /* set baudrate and oversampling */ writel(new_divider, base + UART_BAUD_REG); writel(new_oversampling, base + UART_POSSR_REG); + /* No Parity, 1 Stop */ + writel(0, base + UART_CTRL_REG); + return 0; } @@ -305,7 +317,6 @@ U_BOOT_DRIVER(serial_mvebu) = { #ifdef CONFIG_DEBUG_MVEBU_A3700_UART #include <debug_uart.h> -#include <mach/soc.h> static inline void _debug_uart_init(void) { |