All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: [PATCH] fix xmon input on 440
Date: Fri, 14 Sep 2007 15:44:47 -0500	[thread overview]
Message-ID: <1189802687.20625.74.camel@basalt> (raw)

Implement udbg_getc() for 440, which fixes xmon input.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -206,11 +206,22 @@ static void udbg_44x_as1_putc(char c)
        }
 }
 
+static int udbg_44x_as1_getc(void)
+{
+       if (udbg_comport) {
+               while ((as1_readb(&udbg_comport->lsr) & LSR_DR) == 0)
+                       /* wait for char */;
+               return as1_readb(&udbg_comport->rbr);
+       }
+       return -1;
+}
+
 void __init udbg_init_44x_as1(void)
 {
        udbg_comport =
                (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
 
        udbg_putc = udbg_44x_as1_putc;
+       udbg_getc = udbg_44x_as1_getc;
 }
 #endif /* CONFIG_PPC_EARLY_DEBUG_44x */

-- 
Hollis Blanchard
IBM Linux Technology Center

             reply	other threads:[~2007-09-14 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14 20:44 Hollis Blanchard [this message]
2007-09-17  2:52 ` [PATCH] fix xmon input on 440 David Gibson
2007-09-17  3:26   ` Josh Boyer
2007-09-17  3:39     ` Olof Johansson
2007-09-17  4:15       ` Hollis Blanchard
2007-09-17 10:58         ` Josh Boyer
2007-09-17 12:24 ` Milton Miller

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=1189802687.20625.74.camel@basalt \
    --to=hollisb@us.ibm.com \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=linuxppc-dev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.