From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] MIPS: malta: use common DEBUG_LL code for NS16550
Date: Sat, 12 May 2012 11:15:04 +0400 [thread overview]
Message-ID: <1336806904-6251-2-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1336806904-6251-1-git-send-email-antonynpavlov@gmail.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/mips/mach-malta/include/mach/debug_ll.h | 11 +----------
arch/mips/mach-malta/include/mach/hardware.h | 1 +
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/mips/mach-malta/include/mach/debug_ll.h b/arch/mips/mach-malta/include/mach/debug_ll.h
index ccc9d9b..9de469b 100644
--- a/arch/mips/mach-malta/include/mach/debug_ll.h
+++ b/arch/mips/mach-malta/include/mach/debug_ll.h
@@ -24,17 +24,8 @@
#ifndef __INCLUDE_ARCH_DEBUG_LL_H__
#define __INCLUDE_ARCH_DEBUG_LL_H__
-#include <io.h>
#include <mach/hardware.h>
-#define rbr 0
-#define lsr 5
-#define LSR_THRE 0x20 /* Xmit holding register empty */
-
-static __inline__ void putc(char ch)
-{
- while (!(__raw_readb(DEBUG_LL_UART_ADDR + lsr) & LSR_THRE));
- __raw_writeb(ch, DEBUG_LL_UART_ADDR + rbr);
-}
+#include <debug_ll_ns16550.h>
#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
diff --git a/arch/mips/mach-malta/include/mach/hardware.h b/arch/mips/mach-malta/include/mach/hardware.h
index f827cc3..ddeb1b7 100644
--- a/arch/mips/mach-malta/include/mach/hardware.h
+++ b/arch/mips/mach-malta/include/mach/hardware.h
@@ -22,6 +22,7 @@
#define __INCLUDE_ARCH_HARDWARE_H__
#define DEBUG_LL_UART_ADDR 0xb00003f8
+#define DEBUG_LL_UART_SHIFT 0
/*
* Reset register.
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-05-12 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 7:15 [PATCH 1/2] MIPS: add common header file for DEBUG_LL via NS16550 Antony Pavlov
2012-05-12 7:15 ` Antony Pavlov [this message]
2012-05-13 9:02 ` 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=1336806904-6251-2-git-send-email-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--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