tegra124: return the UART base address based on index
Change-Id: I73a8e56559c7ffdaab39a5c19311221c91565004 Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6830 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
33e295e66f
commit
d68932463f
|
@ -95,8 +95,17 @@ static int tegra124_uart_tst_byte(struct tegra124_uart *uart_ptr)
|
||||||
|
|
||||||
unsigned int uart_platform_base(int idx)
|
unsigned int uart_platform_base(int idx)
|
||||||
{
|
{
|
||||||
//TODO:return the correct address based on which UART has been selected
|
//Default to UART A
|
||||||
return CONFIG_CONSOLE_SERIAL_UART_ADDRESS;
|
unsigned int base = 0x70006000;
|
||||||
|
//UARTs A - E are mapped as index 0 - 4
|
||||||
|
if ((idx < 5) && (idx >= 0)) {
|
||||||
|
if (idx != 1) { //not UART B
|
||||||
|
base += idx * 0x100;
|
||||||
|
} else {
|
||||||
|
base += 0x40;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
void uart_init(int idx)
|
void uart_init(int idx)
|
||||||
|
|
Loading…
Reference in New Issue