summaryrefslogtreecommitdiffstats
path: root/arch/mips/mach-bcm47xx
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2015-05-12 11:45:05 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-13 08:23:59 +0200
commit4d8be8f01cd699a2b78f1aa3e0980a7297302673 (patch)
treef8cbf7844b8b72e775adfe6c2a291b99fc21fd74 /arch/mips/mach-bcm47xx
parent0f610910e4939c60ab3d680934c8644355a06cf6 (diff)
downloadbarebox-4d8be8f01cd699a2b78f1aa3e0980a7297302673.tar.gz
barebox-4d8be8f01cd699a2b78f1aa3e0980a7297302673.tar.xz
MIPS: bcm47xx: use PUTC_LL() from common debug_ll_ns16550.h header
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/mach-bcm47xx')
-rw-r--r--arch/mips/mach-bcm47xx/include/mach/debug_ll.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/mips/mach-bcm47xx/include/mach/debug_ll.h b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h
index 9927b4d945..3e74e0f670 100644
--- a/arch/mips/mach-bcm47xx/include/mach/debug_ll.h
+++ b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h
@@ -24,16 +24,12 @@
#include <io.h>
#include <mach/hardware.h>
-#define rbr 0
-#define lsr 5
-#define LSR_THRE 0x20 /* Xmit holding register empty */
+#define DEBUG_LL_UART_SHIFT 0
-static __inline__ void PUTC_LL(char ch)
-{
- void *base = (void *)DEBUG_LL_UART_ADDR;
+#define DEBUG_LL_UART_CLK (25804800 / 16)
+#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE
+#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)
- while (!(__raw_readb(base + lsr) & LSR_THRE));
- __raw_writeb(ch, base + rbr);
-}
+#include <asm/debug_ll_ns16550.h>
#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */