mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: mxs: implement debug_ll support
@ 2013-07-11  5:52 Sascha Hauer
  2013-07-11  5:52 ` [PATCH 2/2] ARM: mxs: make ssp gates parents of ssp dividers Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2013-07-11  5:52 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Kconfig                          |  1 +
 arch/arm/mach-mxs/include/mach/debug_ll.h | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 arch/arm/mach-mxs/include/mach/debug_ll.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e7d8cdd..8b95696 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -90,6 +90,7 @@ config ARCH_MXS
 	select GENERIC_GPIO
 	select COMMON_CLK
 	select CLKDEV_LOOKUP
+	select HAS_DEBUG_LL
 
 config ARCH_NETX
 	bool "Hilscher NetX based"
diff --git a/arch/arm/mach-mxs/include/mach/debug_ll.h b/arch/arm/mach-mxs/include/mach/debug_ll.h
new file mode 100644
index 0000000..9e3ce1c
--- /dev/null
+++ b/arch/arm/mach-mxs/include/mach/debug_ll.h
@@ -0,0 +1,22 @@
+#ifndef __MACH_DEBUG_LL_H__
+#define __MACH_DEBUG_LL_H__
+
+#include <io.h>
+#include <mach/imx-regs.h>
+
+#define UARTDBGDR 0x00
+#define UARTDBGFR 0x18
+# define TXFE (1 << 7)
+# define TXFF (1 << 5)
+
+static inline void PUTC_LL(int c)
+{
+	void __iomem *base = (void *)IMX_DBGUART_BASE;
+
+	/* Wait for room in TX FIFO */
+	while (!(readl(base + UARTDBGFR) & TXFE));
+
+	writel(c, base + UARTDBGDR);
+}
+
+#endif /* __MACH_DEBUG_LL_H__ */
-- 
1.8.3.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-11  5:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-11  5:52 [PATCH 1/2] ARM: mxs: implement debug_ll support Sascha Hauer
2013-07-11  5:52 ` [PATCH 2/2] ARM: mxs: make ssp gates parents of ssp dividers Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox