summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-06-19 06:50:32 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-24 08:53:47 +0200
commitbdbb72b8b3bb76de301d511efd7362008cc8cc3e (patch)
treea0f4e338d2d4aeb37f959aa669761fc406eca73e /arch
parent1f3ce24ef52f2ec4473801a4bf49f86f0936b4c2 (diff)
downloadbarebox-bdbb72b8b3bb76de301d511efd7362008cc8cc3e.tar.gz
barebox-bdbb72b8b3bb76de301d511efd7362008cc8cc3e.tar.xz
RISC-V: erizo: make it easier to reuse ns16550 debug_ll
Incoming StarFive support also uses ns16550 compatibles as UART IP. Make reuse easier by making the two most likely parameters to change SoC-specific (base address and baud clock frequency) and move the rest behind the new CONFIG_DEBUG_LL_NS16550. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210619045055.779-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/include/asm/debug_ll.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/riscv/include/asm/debug_ll.h b/arch/riscv/include/asm/debug_ll.h
index 6904460af9..13609d25c5 100644
--- a/arch/riscv/include/asm/debug_ll.h
+++ b/arch/riscv/include/asm/debug_ll.h
@@ -12,13 +12,16 @@
#include <linux/kconfig.h>
-#ifdef CONFIG_DEBUG_ERIZO
+#ifdef CONFIG_DEBUG_LL_NS16550
+#if defined CONFIG_DEBUG_ERIZO
#define DEBUG_LL_UART_ADDR 0x90000000
+#define DEBUG_LL_UART_CLK (24000000 / 16)
+#endif
+
#define DEBUG_LL_UART_SHIFT 2
#define DEBUG_LL_UART_IOSIZE32
-#define DEBUG_LL_UART_CLK (24000000 / 16)
#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE
#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)