serial: uartlite: Add support to work with any endianness
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>
Fri, 14 Aug 2020 09:02:15 +0000 (03:02 -0600)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 23 Sep 2020 08:31:40 +0000 (10:31 +0200)
commit31a359f87eaa66caf44dd10f89885736186537dd
tree1a7c4ddd66be745184045b2f57d86fe38eba119c
parent592ac773428a868a8ed4165f4b8a49afccea3919
serial: uartlite: Add support to work with any endianness

This endinness changes are taken from linux uartlite driver.
Reset TX fifo in control register and check TX fifo empty
flag in lower byte of the status register to detect if it
is a little endian system. Based on this check, program the
registers with le32 or be32 through out the driver.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/serial/serial_xuartlite.c