Commit 6059b3cb authored by Michal Simek's avatar Michal Simek

microblaze: Print early printk information to log buffer

If early printk console is not enabled then all messages
are written to log buffer.
Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent 3f218935
...@@ -92,6 +92,12 @@ inline unsigned get_romfs_len(unsigned *addr) ...@@ -92,6 +92,12 @@ inline unsigned get_romfs_len(unsigned *addr)
} }
#endif /* CONFIG_MTD_UCLINUX_EBSS */ #endif /* CONFIG_MTD_UCLINUX_EBSS */
#if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_SERIAL_UARTLITE_CONSOLE)
#define eprintk early_printk
#else
#define eprintk printk
#endif
void __init machine_early_init(const char *cmdline, unsigned int ram, void __init machine_early_init(const char *cmdline, unsigned int ram,
unsigned int fdt, unsigned int msr) unsigned int fdt, unsigned int msr)
{ {
...@@ -139,32 +145,32 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, ...@@ -139,32 +145,32 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
setup_early_printk(NULL); setup_early_printk(NULL);
#endif #endif
early_printk("Ramdisk addr 0x%08x, ", ram); eprintk("Ramdisk addr 0x%08x, ", ram);
if (fdt) if (fdt)
early_printk("FDT at 0x%08x\n", fdt); eprintk("FDT at 0x%08x\n", fdt);
else else
early_printk("Compiled-in FDT at 0x%08x\n", eprintk("Compiled-in FDT at 0x%08x\n",
(unsigned int)_fdt_start); (unsigned int)_fdt_start);
#ifdef CONFIG_MTD_UCLINUX #ifdef CONFIG_MTD_UCLINUX
early_printk("Found romfs @ 0x%08x (0x%08x)\n", eprintk("Found romfs @ 0x%08x (0x%08x)\n",
romfs_base, romfs_size); romfs_base, romfs_size);
early_printk("#### klimit %p ####\n", old_klimit); eprintk("#### klimit %p ####\n", old_klimit);
BUG_ON(romfs_size < 0); /* What else can we do? */ BUG_ON(romfs_size < 0); /* What else can we do? */
early_printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", eprintk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n",
romfs_size, romfs_base, (unsigned)&_ebss); romfs_size, romfs_base, (unsigned)&_ebss);
early_printk("New klimit: 0x%08x\n", (unsigned)klimit); eprintk("New klimit: 0x%08x\n", (unsigned)klimit);
#endif #endif
#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
if (msr) if (msr)
early_printk("!!!Your kernel has setup MSR instruction but " eprintk("!!!Your kernel has setup MSR instruction but "
"CPU don't have it %d\n", msr); "CPU don't have it %d\n", msr);
#else #else
if (!msr) if (!msr)
early_printk("!!!Your kernel not setup MSR instruction but " eprintk("!!!Your kernel not setup MSR instruction but "
"CPU have it %d\n", msr); "CPU have it %d\n", msr);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment