blob: 353f6cd62448b73c5150d482b270573ac4c09795 [file] [log] [blame]
Angel Pons5de47d02020-04-04 18:51:30 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Jonathan Neuschäfer55b46452018-04-19 16:23:54 +02002
Philipp Hugdf5e6f62018-07-11 13:31:34 +02003#include <stdint.h>
Jonathan Neuschäfer55b46452018-04-19 16:23:54 +02004#include <console/uart.h>
Elyes HAOUAS0d0fe142020-05-07 21:36:06 +02005#include <commonlib/bsd/helpers.h>
Jonathan Neuschäfer55b46452018-04-19 16:23:54 +02006#include <soc/addressmap.h>
Philipp Hugdf5e6f62018-07-11 13:31:34 +02007#include <soc/clock.h>
Jonathan Neuschäfer55b46452018-04-19 16:23:54 +02008
Felix Helde3a12472020-09-11 15:47:09 +02009uintptr_t uart_platform_base(unsigned int idx)
Jonathan Neuschäfer55b46452018-04-19 16:23:54 +020010{
11 if (idx < 2)
12 return FU540_UART(idx);
13 else
14 return 0;
15}
Philipp Hug75244002018-07-07 21:34:31 +020016
17unsigned int uart_platform_refclk(void)
18{
Jonathan Neuschäfer97ca02c2018-10-29 14:32:49 +010019 return clock_get_tlclk_khz() * KHz;
Philipp Hug75244002018-07-07 21:34:31 +020020}