SPL is cleaning bss after calling board_init_f. Setting up console is done
and little_endian global variable is cleared which caused that console
stops to work. That's why move it to data seciton now. The patch should be
reverted when bss is cleared before board_init_f is called.

Signed-off-by: Michal Simek <michal.si...@amd.com>
---

 drivers/serial/serial_xuartlite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/serial_xuartlite.c 
b/drivers/serial/serial_xuartlite.c
index b6197da97cc1..35df413321fe 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -23,7 +23,7 @@
 #define ULITE_CONTROL_RST_TX   0x01
 #define ULITE_CONTROL_RST_RX   0x02
 
-static bool little_endian;
+static bool little_endian __section(".data");
 
 struct uartlite {
        unsigned int rx_fifo;
-- 
2.36.1

Reply via email to