summaryrefslogtreecommitdiff
path: root/src/soc/sifive/fu540/uart.c
blob: 6736a1694c11c42444fd7457bd5fa47dfc3ac401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: GPL-2.0-only */

#include <stddef.h>
#include <stdint.h>
#include <console/uart.h>
#include <commonlib/bsd/helpers.h>
#include <soc/addressmap.h>
#include <soc/clock.h>

uintptr_t uart_platform_base(int idx)
{
	if (idx < 2)
		return FU540_UART(idx);
	else
		return 0;
}

unsigned int uart_platform_refclk(void)
{
	return clock_get_tlclk_khz() * KHz;
}