From 6632a20b979995a376d2544411b8a1474b0ea953 Mon Sep 17 00:00:00 2001 From: Siguza Date: Sun, 13 Oct 2024 05:45:21 +0200 Subject: [PATCH] Add uart0 fallback for T2, sigh --- src/drivers/uart/uart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/uart/uart.c b/src/drivers/uart/uart.c index e5681599..330517ab 100644 --- a/src/drivers/uart/uart.c +++ b/src/drivers/uart/uart.c @@ -94,7 +94,8 @@ static dt_node_t* serial_dt_node(void) static dt_node_t *uart = NULL; if(!uart) { - uart = dt_node_parent(dt_get("debug-console")); + dt_node_t *console = dt_find(gDeviceTree, "debug-console"); + uart = console ? dt_node_parent(console) : dt_get("uart0"); } return uart; }