aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/udbg_16550.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/udbg_16550.c')
-rw-r--r--arch/powerpc/kernel/udbg_16550.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index a963f657222b..7afab5bcd61a 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -191,3 +191,26 @@ void udbg_init_pas_realmode(void)
191 udbg_getc_poll = NULL; 191 udbg_getc_poll = NULL;
192} 192}
193#endif /* CONFIG_PPC_MAPLE */ 193#endif /* CONFIG_PPC_MAPLE */
194
195#ifdef CONFIG_PPC_EARLY_DEBUG_44x
196#include <platforms/44x/44x.h>
197
198static void udbg_44x_as1_putc(char c)
199{
200 if (udbg_comport) {
201 while ((as1_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
202 /* wait for idle */;
203 as1_writeb(c, &udbg_comport->thr); eieio();
204 if (c == '\n')
205 udbg_44x_as1_putc('\r');
206 }
207}
208
209void __init udbg_init_44x_as1(void)
210{
211 udbg_comport =
212 (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
213
214 udbg_putc = udbg_44x_as1_putc;
215}
216#endif /* CONFIG_PPC_EARLY_DEBUG_44x */