[coreboot-gerrit] New patch to review for coreboot: d8cf0d3 tegra124: return the UART base address based on index

Isaac Christensen (isaac.christensen@se-eng.com) gerrit at coreboot.org
Wed Sep 3 23:38:28 CEST 2014


Isaac Christensen (isaac.christensen at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6830

-gerrit

commit d8cf0d36560c6e5c578a83563ac1f92d12d025df
Author: Isaac Christensen <isaac.christensen at se-eng.com>
Date:   Wed Sep 3 15:34:05 2014 -0600

    tegra124: return the UART base address based on index
    
    Change-Id: I73a8e56559c7ffdaab39a5c19311221c91565004
    Signed-off-by: Isaac Christensen <isaac.christensen at se-eng.com>
---
 src/soc/nvidia/tegra124/uart.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/soc/nvidia/tegra124/uart.c b/src/soc/nvidia/tegra124/uart.c
index d28cbb7..48195ca 100644
--- a/src/soc/nvidia/tegra124/uart.c
+++ b/src/soc/nvidia/tegra124/uart.c
@@ -95,8 +95,17 @@ static int tegra124_uart_tst_byte(struct tegra124_uart *uart_ptr)
 
 unsigned int uart_platform_base(int idx)
 {
-	//TODO:return the correct address based on which UART has been selected
-	return CONFIG_CONSOLE_SERIAL_UART_ADDRESS;
+	//Default to UART A
+	unsigned int base = 0x70006000;
+	//UARTs A - E are mapped as index 0 - 4
+	if(idx < 5) {
+		if(idx != 1) { //not UART B
+			base += idx * 0x100;
+		} else {
+			base += 0x40;
+		}
+	}
+	return base;
 }
 
 void uart_init(int idx)



More information about the coreboot-gerrit mailing list