diff options
-rw-r--r-- | drivers/serial/serial_zynq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c index 4ae24939ab..cc14bfa39c 100644 --- a/drivers/serial/serial_zynq.c +++ b/drivers/serial/serial_zynq.c @@ -15,6 +15,8 @@ #include <linux/compiler.h> #include <serial.h> +DECLARE_GLOBAL_DATA_PTR; + #define ZYNQ_UART_SR_TXACTIVE BIT(11) /* TX active */ #define ZYNQ_UART_SR_TXFULL BIT(4) /* TX FIFO full */ #define ZYNQ_UART_SR_RXEMPTY BIT(1) /* RX FIFO empty */ @@ -137,6 +139,10 @@ static int zynq_serial_probe(struct udevice *dev) { struct zynq_uart_priv *priv = dev_get_priv(dev); + /* No need to reinitialize the UART after relocation */ + if (gd->flags & GD_FLG_RELOC) + return 0; + _uart_zynq_serial_init(priv->regs); return 0; |