From 90fd0727c7c3be143caef7fb397c093a3151ba3b Mon Sep 17 00:00:00 2001 From: Jonathan Neuschäfer Date: Mon, 29 Oct 2018 14:25:05 +0100 Subject: soc/sifive/fu540: Simplify UART refclk calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clock_get_coreclk_khz() already detects whether the PLL or the input clock (hfclk) is used. Tested on HiFive Unleashed. Change-Id: I264977b0de0b81ef74a014984b6d33638ab33f4b Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/c/29334 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Hug Reviewed-by: Patrick Rudolph --- src/soc/sifive/fu540/uart.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/soc/sifive/fu540/uart.c') diff --git a/src/soc/sifive/fu540/uart.c b/src/soc/sifive/fu540/uart.c index b563be13b1..454b13d111 100644 --- a/src/soc/sifive/fu540/uart.c +++ b/src/soc/sifive/fu540/uart.c @@ -30,11 +30,8 @@ uintptr_t uart_platform_base(int idx) unsigned int uart_platform_refclk(void) { /* - * The SiFive UART uses tlclk, which is coreclk/2 as input + * The SiFive UART uses tlclk, which is coreclk/2, as input */ - if (ENV_BOOTBLOCK) - return 33330000 / 2; - else - return clock_get_coreclk_khz() * KHz / 2; + return clock_get_coreclk_khz() * KHz / 2; } -- cgit v1.2.3