Re: [patch 3/7] xenon: udbg support (ugly)
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2007-03-07 21:00:07
On Wed, 7 Mar 2007, Felix Domke wrote:
quoted hunk ↗ jump to hunk
--- linux-2.6.20.orig/arch/powerpc/kernel/udbg.c 2007-03-07 19:01:12.000000000 +0100 +++ linux-2.6.20/arch/powerpc/kernel/udbg.c 2007-03-07 19:01:21.000000000 +0100@@ -25,6 +25,18 @@ * Early debugging facilities. You can enable _one_ of these via .config, * if you do so your kernel _will not boot_ on anything else. Be careful. */ + +extern u8 real_readb(volatile u8 __iomem *addr); +extern void real_writeb(u8 data, volatile u8 __iomem *addr); + +void udbg_xenon_real_putc(char c) +{ + if (c == '\n') + udbg_xenon_real_putc('\r'); + while (!(real_readb((void*)0x80000200ea001018ULL)&0x02)); + real_writeb(c, (void*)0x80000200ea001014ULL); +} + void __init udbg_early_init(void) { #if defined(CONFIG_PPC_EARLY_DEBUG_LPAR)@@ -46,6 +58,7 @@ /* For iSeries - hit Ctrl-x Ctrl-x to see the output */ udbg_init_iseries(); #endif + udbg_putc = udbg_xenon_real_putc;
No #ifdef?
quoted hunk ↗ jump to hunk
} /* udbg library, used by xmon et al */@@ -150,6 +163,7 @@ printk(KERN_INFO "early console immortal !\n"); return; } + return;
??
unregister_console(&udbg_console); early_console_initialized = 0; }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds