diff options
author | Maximilian Brune <maximilian.brune@9elements.com> | 2024-01-14 21:59:27 +0600 |
---|---|---|
committer | ron minnich <rminnich@gmail.com> | 2024-03-03 21:20:03 +0000 |
commit | 2ccb8e7891f429c3b72773860521a2b943a049be (patch) | |
tree | 2acf887ac1555980342f31f0fda35dbdefda915e /src/soc/sifive/fu740/uart.c | |
parent | ec7b48076009cfe82e5ee91050f5fc66c4850193 (diff) |
soc/sifive/fu740: Add FU740 SOC
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I4a8fe02ef0adcb939aa65377a35874715c5ee58a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76689
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: ron minnich <rminnich@gmail.com>
Diffstat (limited to 'src/soc/sifive/fu740/uart.c')
-rw-r--r-- | src/soc/sifive/fu740/uart.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/soc/sifive/fu740/uart.c b/src/soc/sifive/fu740/uart.c new file mode 100644 index 0000000000..94a6d2d34c --- /dev/null +++ b/src/soc/sifive/fu740/uart.c @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#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(unsigned int idx) +{ + if (idx < 2) + return FU740_UART(idx); + else + return 0; +} + +unsigned int uart_platform_refclk(void) +{ + // peripheral clock is attached to UART subsystem + return clock_get_pclk(); +} |