[POWERPC] Early serial debug support for PPC44x
This adds support for early serial debugging via the built in port on IBM/AMCC PowerPC 44x CPUs. It uses a bolted TLB entry in address space 1 for the UART's mapping, allowing robust debugging both before and after the initialization of the MMU. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
f6dfc80554
commit
d9b55a0361
@@ -191,3 +191,26 @@ void udbg_init_pas_realmode(void)
|
||||
udbg_getc_poll = NULL;
|
||||
}
|
||||
#endif /* CONFIG_PPC_MAPLE */
|
||||
|
||||
#ifdef CONFIG_PPC_EARLY_DEBUG_44x
|
||||
#include <platforms/44x/44x.h>
|
||||
|
||||
static void udbg_44x_as1_putc(char c)
|
||||
{
|
||||
if (udbg_comport) {
|
||||
while ((as1_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
|
||||
/* wait for idle */;
|
||||
as1_writeb(c, &udbg_comport->thr); eieio();
|
||||
if (c == '\n')
|
||||
udbg_44x_as1_putc('\r');
|
||||
}
|
||||
}
|
||||
|
||||
void __init udbg_init_44x_as1(void)
|
||||
{
|
||||
udbg_comport =
|
||||
(volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
|
||||
|
||||
udbg_putc = udbg_44x_as1_putc;
|
||||
}
|
||||
#endif /* CONFIG_PPC_EARLY_DEBUG_44x */
|
||||
|
Reference in New Issue
Block a user