summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcm283x/include/mach/debug_ll.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-06-29 09:01:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-06-29 09:01:05 +0200
commitcc9b06f0c8f11c56fc706614ff96d237eecefd45 (patch)
tree2d7505353c924ff2e526f311582b4eaabaa5d840 /arch/arm/mach-bcm283x/include/mach/debug_ll.h
parent97afea15a9f2f09c3009ad6e94ca9b40cc95b33a (diff)
parent6f4f30b9c1fbd20ebf1b05843cf344fa2bb35f65 (diff)
downloadbarebox-cc9b06f0c8f11c56fc706614ff96d237eecefd45.tar.gz
barebox-cc9b06f0c8f11c56fc706614ff96d237eecefd45.tar.xz
Merge branch 'for-next/rpi4'
Diffstat (limited to 'arch/arm/mach-bcm283x/include/mach/debug_ll.h')
-rw-r--r--arch/arm/mach-bcm283x/include/mach/debug_ll.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-bcm283x/include/mach/debug_ll.h b/arch/arm/mach-bcm283x/include/mach/debug_ll.h
index 4bfa5abc7c..fdb63b4f5a 100644
--- a/arch/arm/mach-bcm283x/include/mach/debug_ll.h
+++ b/arch/arm/mach-bcm283x/include/mach/debug_ll.h
@@ -18,6 +18,7 @@
#define __MACH_BCM2835_DEBUG_LL_H__
#include <mach/platform.h>
+#include <io.h>
#ifdef CONFIG_DEBUG_RPI1_UART
@@ -66,6 +67,31 @@ static inline void debug_ll_init(void)
debug_ll_ns16550_init(divisor);
}
+#elif defined CONFIG_DEBUG_RPI4_MINI_UART
+
+static inline uint8_t debug_ll_read_reg(int reg)
+{
+ return readb(BCM2711_MINIUART_BASE + (reg << 2));
+}
+
+static inline void debug_ll_write_reg(int reg, uint8_t val)
+{
+ writeb(val, BCM2711_MINIUART_BASE + (reg << 2));
+}
+
+#include <debug_ll/ns16550.h>
+
+static inline void debug_ll_init(void)
+{
+ /* Configured by ROM */
+}
+
+#else
+
+static inline void debug_ll_init(void)
+{
+}
+
#endif
#endif /* __MACH_BCM2835_DEBUG_LL_H__ */