mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] ARM: mxs: implement debug_ll support
Date: Thu, 11 Jul 2013 07:52:58 +0200	[thread overview]
Message-ID: <1373521979-7719-1-git-send-email-s.hauer@pengutronix.de> (raw)

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

             reply	other threads:[~2013-07-11  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11  5:52 Sascha Hauer [this message]
2013-07-11  5:52 ` [PATCH 2/2] ARM: mxs: make ssp gates parents of ssp dividers Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373521979-7719-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox