From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] debug_ll: Let architectures define PUTC_LL directly
Date: Mon, 26 Nov 2012 11:13:25 +0100 [thread overview]
Message-ID: <1353924807-519-1-git-send-email-s.hauer@pengutronix.de> (raw)
putc already is a regular barebox function. To avoid conflicts and
confusions just let architectures define PUTC_LL directly instead
of going through this addiotional redirection.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-omap/include/mach/debug_ll.h | 2 +-
arch/arm/mach-tegra/include/mach/debug_ll.h | 2 +-
arch/arm/mach-versatile/include/mach/debug_ll.h | 2 +-
arch/mips/include/debug_ll_ns16550.h | 2 +-
arch/mips/mach-bcm47xx/include/mach/debug_ll.h | 2 +-
include/debug_ll.h | 1 -
6 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap/include/mach/debug_ll.h b/arch/arm/mach-omap/include/mach/debug_ll.h
index c1fcc9d..b2714c5 100644
--- a/arch/arm/mach-omap/include/mach/debug_ll.h
+++ b/arch/arm/mach-omap/include/mach/debug_ll.h
@@ -39,7 +39,7 @@
#define LSR (5 << 2)
#define THR (0 << 2)
-static inline void putc(char c)
+static inline void PUTC_LL(char c)
{
/* Wait until there is space in the FIFO */
while ((readb(UART_BASE + LSR) & LSR_THRE) == 0);
diff --git a/arch/arm/mach-tegra/include/mach/debug_ll.h b/arch/arm/mach-tegra/include/mach/debug_ll.h
index 18024eb..290ad58 100644
--- a/arch/arm/mach-tegra/include/mach/debug_ll.h
+++ b/arch/arm/mach-tegra/include/mach/debug_ll.h
@@ -31,7 +31,7 @@
#define lsr (5 << DEBUG_LL_UART_RSHFT)
#define LSR_THRE 0x20 /* Xmit holding register empty */
-static inline void putc(char ch)
+static inline void PUTC_LL(char ch)
{
while (!(__raw_readb(DEBUG_LL_UART_ADDR + lsr) & LSR_THRE))
;
diff --git a/arch/arm/mach-versatile/include/mach/debug_ll.h b/arch/arm/mach-versatile/include/mach/debug_ll.h
index 20fbc7c..f91812b 100644
--- a/arch/arm/mach-versatile/include/mach/debug_ll.h
+++ b/arch/arm/mach-versatile/include/mach/debug_ll.h
@@ -19,7 +19,7 @@
#include <linux/amba/serial.h>
#include <io.h>
-static inline void putc(char c)
+static inline void PUTC_LL(char c)
{
/* Wait until there is space in the FIFO */
while (readl(0x101F1000 + UART01x_FR) & UART01x_FR_TXFF);
diff --git a/arch/mips/include/debug_ll_ns16550.h b/arch/mips/include/debug_ll_ns16550.h
index a8b74d2..e9c7ecf 100644
--- a/arch/mips/include/debug_ll_ns16550.h
+++ b/arch/mips/include/debug_ll_ns16550.h
@@ -28,7 +28,7 @@
#define LSR_THRE 0x20 /* Xmit holding register empty */
-static __inline__ void putc(char ch)
+static __inline__ void PUTC_LL(char ch)
{
while (!(__raw_readb((u8 *)DEBUG_LL_UART_ADDR + lsr) & LSR_THRE));
__raw_writeb(ch, (u8 *)DEBUG_LL_UART_ADDR + rbr);
diff --git a/arch/mips/mach-bcm47xx/include/mach/debug_ll.h b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h
index 4bf1817..0703bb0 100644
--- a/arch/mips/mach-bcm47xx/include/mach/debug_ll.h
+++ b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h
@@ -28,7 +28,7 @@
#define lsr 5
#define LSR_THRE 0x20 /* Xmit holding register empty */
-static __inline__ void putc(char ch)
+static __inline__ void PUTC_LL(char ch)
{
while (!(__raw_readb(DEBUG_LL_UART_ADDR + lsr) & LSR_THRE));
__raw_writeb(ch, DEBUG_LL_UART_ADDR + rbr);
diff --git a/include/debug_ll.h b/include/debug_ll.h
index c744573..c5f2df4 100644
--- a/include/debug_ll.h
+++ b/include/debug_ll.h
@@ -22,7 +22,6 @@
#if defined (CONFIG_DEBUG_LL)
# include <mach/debug_ll.h>
-#define PUTC_LL(x) putc(x)
# define PUTHEX_LL(value) ({ unsigned long v = (unsigned long) (value); \
int i; unsigned char ch; \
for (i = 8; i--; ) {\
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2012-11-26 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 10:13 Sascha Hauer [this message]
2012-11-26 10:13 ` [PATCH 2/3] debug_ll: Add some usage comments Sascha Hauer
2012-11-26 10:13 ` [PATCH 3/3] i.MX debug_ll support 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=1353924807-519-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