serial: zynq: Change uart initialization logic
authorMichal Simek <michal.simek@xilinx.com>
Tue, 24 Mar 2020 10:31:42 +0000 (11:31 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 6 Apr 2020 10:52:45 +0000 (12:52 +0200)
commit895a7866c20cf6c01779b5a60fbf2770b88930a4
tree289bd3a5ab6f82236f30fc4a5cda932dee6a912a
parent5028358a6a5c3e7fd2d20b190a4205ba3e136ab8
serial: zynq: Change uart initialization logic

The commit a673025535ae ("serial: zynq: Initialize uart only before
relocation") introduced code which detects relocation which is working for
single uart instance. With multiple instances in place there is a need to
enable and setup every instance. That's why detect if TX is enabled. If it
is then don't initialize uart again.
In post probe setbrg is called to setup baudrate but values should be the
same.

As a side effect of this change is that DECLARE_GLOBAL_DATA_PTR can be
removed completely.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/serial/serial_zynq.c