linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix xmon input on 440
@ 2007-09-14 20:44 Hollis Blanchard
  2007-09-17  2:52 ` David Gibson
  2007-09-17 12:24 ` Milton Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Hollis Blanchard @ 2007-09-14 20:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-09-17 12:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-14 20:44 [PATCH] fix xmon input on 440 Hollis Blanchard
2007-09-17  2:52 ` 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

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).