From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Subject: [PATCH v3 2/6] powerpc/44x: allow override to hard-coded uart address
Date: Wed, 9 Feb 2011 17:08:09 -0600 [thread overview]
Message-ID: <1297292893-30241-3-git-send-email-shaggy@linux.vnet.ibm.com> (raw)
In-Reply-To: <1297292893-30241-1-git-send-email-shaggy@linux.vnet.ibm.com>
Allow the early debug uart address to be overridden from the kernel
command line.
I would have preferred use the uart's virtual-reg property, but the device
tree hasn't been unflatted yet, and I don't know a reliable way to find it.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/kernel/udbg_16550.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index b4b167b..d36021a 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -219,6 +219,19 @@ void udbg_init_pas_realmode(void)
#ifdef CONFIG_PPC_EARLY_DEBUG_44x
#include <platforms/44x/44x.h>
+static unsigned long udbg_44x_comport = PPC44x_EARLY_DEBUG_VIRTADDR;
+
+static int __init early_parse_comport(char *p)
+{
+ if (!p || !(*p))
+ return 0;
+
+ udbg_44x_comport = simple_strtoul(p, 0, 16);
+
+ return 0;
+}
+early_param("uart_addr", early_parse_comport);
+
static void udbg_44x_as1_flush(void)
{
if (udbg_comport) {
@@ -249,9 +262,7 @@ static int udbg_44x_as1_getc(void)
void __init udbg_init_44x_as1(void)
{
- udbg_comport =
- (struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
-
+ udbg_comport = (struct NS16550 __iomem *)udbg_44x_comport;
udbg_putc = udbg_44x_as1_putc;
udbg_flush = udbg_44x_as1_flush;
udbg_getc = udbg_44x_as1_getc;
--
1.7.3.4
next prev parent reply other threads:[~2011-02-09 23:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 23:08 [PATCH v3 0/6] powerpc: AMP support for 47x Dave Kleikamp
2011-02-09 23:08 ` [PATCH v3 1/6] powerpc: Move udbg_early_init() after early_init_devtree() Dave Kleikamp
2011-03-15 13:05 ` Josh Boyer
2011-03-17 7:01 ` Benjamin Herrenschmidt
2011-02-09 23:08 ` Dave Kleikamp [this message]
2011-02-09 23:08 ` [PATCH v3 3/6] powerpc/47x: allow kernel to be loaded in higher physical memory Dave Kleikamp
2011-02-09 23:08 ` [PATCH v3 4/6] powerpc/44x: don't use tlbivax on AMP systems Dave Kleikamp
2011-02-09 23:08 ` [PATCH v3 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address Dave Kleikamp
2011-02-09 23:08 ` [PATCH v3 6/6] powerpc/476: Create a dts files for two 476 AMP instances under ISS Dave Kleikamp
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=1297292893-30241-3-git-send-email-shaggy@linux.vnet.ibm.com \
--to=shaggy@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).