aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/uart/uart_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/common/block/uart/uart_console.c')
-rw-r--r--src/soc/amd/common/block/uart/uart_console.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/uart/uart_console.c b/src/soc/amd/common/block/uart/uart_console.c
new file mode 100644
index 0000000000..c1c17232fb
--- /dev/null
+++ b/src/soc/amd/common/block/uart/uart_console.c
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <console/uart.h>
+#include <soc/uart.h>
+
+/*
+ * uart_platform_base and uart_platform_refclk are used by the console UART driver and need to
+ * be provided exactly once and only by the UART that is used for console.
+ */
+
+uintptr_t uart_platform_base(unsigned int idx)
+{
+ return get_uart_base(idx);
+}
+
+unsigned int uart_platform_refclk(void)
+{
+ return CONFIG(AMD_SOC_UART_48MZ) ? 48000000 : 115200 * 16;
+}