Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33767
Change subject: src/soc/amd/picasso: Update UARTs ......................................................................
src/soc/amd/picasso: Update UARTs
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Change-Id: I74579674544f0edd2c0e6c4963270b442668e62f --- M src/soc/amd/picasso/include/soc/iomap.h M src/soc/amd/picasso/uart.c 2 files changed, 14 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/33767/1
diff --git a/src/soc/amd/picasso/include/soc/iomap.h b/src/soc/amd/picasso/include/soc/iomap.h index b9d1ab5..b06e101 100644 --- a/src/soc/amd/picasso/include/soc/iomap.h +++ b/src/soc/amd/picasso/include/soc/iomap.h @@ -59,8 +59,11 @@ #endif #define HPET_BASE_ADDRESS 0xfed00000
-#define APU_UART0_BASE 0xfedc6000 -#define APU_UART1_BASE 0xfedc8000 +#define APU_UART0_BASE 0xfedc9000 +#define APU_UART1_BASE 0xfedca000 +#define APU_UART2_BASE 0xfedce000 +#define APU_UART3_BASE 0xfedcf000 +#define APU_UART_MAX_PORT 3
#define FLASH_BASE_ADDR ((0xffffffff - CONFIG_ROM_SIZE) + 1)
diff --git a/src/soc/amd/picasso/uart.c b/src/soc/amd/picasso/uart.c index d5d3006..339bd27 100644 --- a/src/soc/amd/picasso/uart.c +++ b/src/soc/amd/picasso/uart.c @@ -16,12 +16,19 @@ #include <console/uart.h> #include <soc/southbridge.h>
+static const uintptr_t uart_addresses[] = { + APU_UART0_BASE, + APU_UART1_BASE, + APU_UART2_BASE, + APU_UART3_BASE, +}; + uintptr_t uart_platform_base(int idx) { - if (CONFIG_UART_FOR_CONSOLE < 0 || CONFIG_UART_FOR_CONSOLE > 1) + if (idx < 0 || idx > APU_UART_MAX_PORT) return 0;
- return (uintptr_t)(APU_UART0_BASE + 0x2000 * (idx & 1)); + return uart_addresses[uart]; }
unsigned int uart_platform_refclk(void)