Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260732
b: refs/heads/master
c: e721a45
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Jul 25, 2011
1 parent c87ee1d commit cf6aa4a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95ce618f85a86a7383c1a3e39278be3de84b1b99
refs/heads/master: e721a45fbed13a52093d2cc1962dbb8a754462ea
1 change: 1 addition & 0 deletions trunk/arch/microblaze/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ extern char cmd_line[COMMAND_LINE_SIZE];
void early_printk(const char *fmt, ...);

int setup_early_printk(char *opt);
void remap_early_printk(void);
void disable_early_printk(void);

#if defined(CONFIG_EARLY_PRINTK)
Expand Down
20 changes: 16 additions & 4 deletions trunk/arch/microblaze/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void early_printk_uartlite_write(struct console *unused,
static struct console early_serial_uartlite_console = {
.name = "earlyser",
.write = early_printk_uartlite_write,
.flags = CON_PRINTBUFFER,
.flags = CON_PRINTBUFFER | CON_BOOT,
.index = -1,
};
#endif /* CONFIG_SERIAL_UARTLITE_CONSOLE */
Expand Down Expand Up @@ -104,7 +104,7 @@ static void early_printk_uart16550_write(struct console *unused,
static struct console early_serial_uart16550_console = {
.name = "earlyser",
.write = early_printk_uart16550_write,
.flags = CON_PRINTBUFFER,
.flags = CON_PRINTBUFFER | CON_BOOT,
.index = -1,
};
#endif /* CONFIG_SERIAL_8250_CONSOLE */
Expand Down Expand Up @@ -141,7 +141,7 @@ int __init setup_early_printk(char *opt)
early_printk("early_printk_console is enabled at 0x%08x\n",
base_addr);

/* register_console(early_console); */
register_console(early_console);

return 0;
}
Expand All @@ -160,7 +160,7 @@ int __init setup_early_printk(char *opt)
early_printk("early_printk_console is enabled at 0x%08x\n",
base_addr);

/* register_console(early_console); */
register_console(early_console);

return 0;
}
Expand All @@ -169,6 +169,18 @@ int __init setup_early_printk(char *opt)
return 1;
}

/* Remap early console to virtual address and do not allocate one TLB
* only for early console because of performance degression */
void __init remap_early_printk(void)
{
if (!early_console_initialized || !early_console)
return;
printk(KERN_INFO "early_printk_console remaping from 0x%x to ",
base_addr);
base_addr = (u32) ioremap(base_addr, PAGE_SIZE);
printk(KERN_CONT "0x%x\n", base_addr);
}

void __init disable_early_printk(void)
{
if (!early_console_initialized || !early_console)
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/microblaze/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ void __init setup_arch(char **cmdline_p)

setup_memory();

#ifdef CONFIG_EARLY_PRINTK
/* remap early console to virtual address */
remap_early_printk();
#endif

xilinx_pci_init();

#if defined(CONFIG_SELFMOD_INTC) || defined(CONFIG_SELFMOD_TIMER)
Expand Down

0 comments on commit cf6aa4a

Please sign in to comment.