diff --git a/src/soc/nvidia/tegra132/Kconfig b/src/soc/nvidia/tegra132/Kconfig index a0b88ed368..411c07c035 100644 --- a/src/soc/nvidia/tegra132/Kconfig +++ b/src/soc/nvidia/tegra132/Kconfig @@ -54,44 +54,45 @@ config STACK_BOTTOM choice CONSOLE_SERIAL_TEGRA132_UART_CHOICES prompt "Serial Console UART" - default CONSOLE_SERIAL_UARTA + default CONSOLE_SERIAL_TEGRA132_UARTA depends on CONSOLE_SERIAL_UART -config CONSOLE_SERIAL_UARTA +config CONSOLE_SERIAL_TEGRA132_UARTA bool "UARTA" + default y help Serial console on UART A. -config CONSOLE_SERIAL_UARTB +config CONSOLE_SERIAL_TEGRA132_UARTB bool "UARTB" help Serial console on UART B. -config CONSOLE_SERIAL_UARTC +config CONSOLE_SERIAL_TEGRA132_UARTC bool "UARTC" help Serial console on UART C. -config CONSOLE_SERIAL_UARTD +config CONSOLE_SERIAL_TEGRA132_UARTD bool "UARTD" help Serial console on UART D. -config CONSOLE_SERIAL_UARTE +config CONSOLE_SERIAL_TEGRA132_UARTE bool "UARTE" help Serial console on UART E. endchoice -config CONSOLE_SERIAL_UART_ADDRESS +config CONSOLE_SERIAL_TEGRA132_UART_ADDRESS hex depends on CONSOLE_SERIAL_UART - default 0x70006000 if CONSOLE_SERIAL_UARTA - default 0x70006040 if CONSOLE_SERIAL_UARTB - default 0x70006200 if CONSOLE_SERIAL_UARTC - default 0x70006300 if CONSOLE_SERIAL_UARTD - default 0x70006400 if CONSOLE_SERIAL_UARTE + default 0x70006000 if CONSOLE_SERIAL_TEGRA132_UARTA + default 0x70006040 if CONSOLE_SERIAL_TEGRA132_UARTB + default 0x70006200 if CONSOLE_SERIAL_TEGRA132_UARTC + default 0x70006300 if CONSOLE_SERIAL_TEGRA132_UARTD + default 0x70006400 if CONSOLE_SERIAL_TEGRA132_UARTE help Map the UART names to the respective MMIO addres. diff --git a/src/soc/nvidia/tegra132/uart.c b/src/soc/nvidia/tegra132/uart.c index 62f9d1a3ff..405a2c797c 100644 --- a/src/soc/nvidia/tegra132/uart.c +++ b/src/soc/nvidia/tegra132/uart.c @@ -43,8 +43,9 @@ struct tegra132_uart { uint32_t msr; // Modem status register. } __attribute__ ((packed)); + static struct tegra132_uart * const uart_ptr = - (void *)CONFIG_CONSOLE_SERIAL_UART_ADDRESS; + (void *)CONFIG_CONSOLE_SERIAL_TEGRA132_UART_ADDRESS; static void tegra132_uart_tx_flush(void); static int tegra132_uart_tst_byte(void);