Maximilian Brune | 2ccb8e7 | 2024-01-14 21:59:27 +0600 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2 | |||||
3 | #include <stdint.h> | ||||
4 | #include <console/uart.h> | ||||
5 | #include <commonlib/bsd/helpers.h> | ||||
6 | #include <soc/addressmap.h> | ||||
7 | #include <soc/clock.h> | ||||
8 | |||||
9 | uintptr_t uart_platform_base(unsigned int idx) | ||||
10 | { | ||||
11 | if (idx < 2) | ||||
12 | return FU740_UART(idx); | ||||
13 | else | ||||
14 | return 0; | ||||
15 | } | ||||
16 | |||||
17 | unsigned int uart_platform_refclk(void) | ||||
18 | { | ||||
19 | // peripheral clock is attached to UART subsystem | ||||
20 | return clock_get_pclk(); | ||||
21 | } |