aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/include/asm/setup.h1
-rw-r--r--arch/microblaze/kernel/early_printk.c20
-rw-r--r--arch/microblaze/kernel/setup.c5
3 files changed, 22 insertions, 4 deletions
diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h
index 8f3968971e4e..904e5ef6a11b 100644
--- a/arch/microblaze/include/asm/setup.h
+++ b/arch/microblaze/include/asm/setup.h
@@ -23,6 +23,7 @@ extern char cmd_line[COMMAND_LINE_SIZE];
23void early_printk(const char *fmt, ...); 23void early_printk(const char *fmt, ...);
24 24
25int setup_early_printk(char *opt); 25int setup_early_printk(char *opt);
26void remap_early_printk(void);
26void disable_early_printk(void); 27void disable_early_printk(void);
27 28
28#if defined(CONFIG_EARLY_PRINTK) 29#if defined(CONFIG_EARLY_PRINTK)
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c
index c3616a080ebf..8f8384e98bf7 100644
--- a/arch/microblaze/kernel/early_printk.c
+++ b/arch/microblaze/kernel/early_printk.c
@@ -60,7 +60,7 @@ static void early_printk_uartlite_write(struct console *unused,
60static struct console early_serial_uartlite_console = { 60static struct console early_serial_uartlite_console = {
61 .name = "earlyser", 61 .name = "earlyser",
62 .write = early_printk_uartlite_write, 62 .write = early_printk_uartlite_write,
63 .flags = CON_PRINTBUFFER, 63 .flags = CON_PRINTBUFFER | CON_BOOT,
64 .index = -1, 64 .index = -1,
65}; 65};
66#endif /* CONFIG_SERIAL_UARTLITE_CONSOLE */ 66#endif /* CONFIG_SERIAL_UARTLITE_CONSOLE */
@@ -104,7 +104,7 @@ static void early_printk_uart16550_write(struct console *unused,
104static struct console early_serial_uart16550_console = { 104static struct console early_serial_uart16550_console = {
105 .name = "earlyser", 105 .name = "earlyser",
106 .write = early_printk_uart16550_write, 106 .write = early_printk_uart16550_write,
107 .flags = CON_PRINTBUFFER, 107 .flags = CON_PRINTBUFFER | CON_BOOT,
108 .index = -1, 108 .index = -1,
109}; 109};
110#endif /* CONFIG_SERIAL_8250_CONSOLE */ 110#endif /* CONFIG_SERIAL_8250_CONSOLE */
@@ -141,7 +141,7 @@ int __init setup_early_printk(char *opt)
141 early_printk("early_printk_console is enabled at 0x%08x\n", 141 early_printk("early_printk_console is enabled at 0x%08x\n",
142 base_addr); 142 base_addr);
143 143
144 /* register_console(early_console); */ 144 register_console(early_console);
145 145
146 return 0; 146 return 0;
147 } 147 }
@@ -160,7 +160,7 @@ int __init setup_early_printk(char *opt)
160 early_printk("early_printk_console is enabled at 0x%08x\n", 160 early_printk("early_printk_console is enabled at 0x%08x\n",
161 base_addr); 161 base_addr);
162 162
163 /* register_console(early_console); */ 163 register_console(early_console);
164 164
165 return 0; 165 return 0;
166 } 166 }
@@ -169,6 +169,18 @@ int __init setup_early_printk(char *opt)
169 return 1; 169 return 1;
170} 170}
171 171
172/* Remap early console to virtual address and do not allocate one TLB
173 * only for early console because of performance degression */
174void __init remap_early_printk(void)
175{
176 if (!early_console_initialized || !early_console)
177 return;
178 printk(KERN_INFO "early_printk_console remaping from 0x%x to ",
179 base_addr);
180 base_addr = (u32) ioremap(base_addr, PAGE_SIZE);
181 printk(KERN_CONT "0x%x\n", base_addr);
182}
183
172void __init disable_early_printk(void) 184void __init disable_early_printk(void)
173{ 185{
174 if (!early_console_initialized || !early_console) 186 if (!early_console_initialized || !early_console)
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 8e2c09b7ff26..0e654a12d37e 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -59,6 +59,11 @@ void __init setup_arch(char **cmdline_p)
59 59
60 setup_memory(); 60 setup_memory();
61 61
62#ifdef CONFIG_EARLY_PRINTK
63 /* remap early console to virtual address */
64 remap_early_printk();
65#endif
66
62 xilinx_pci_init(); 67 xilinx_pci_init();
63 68
64#if defined(CONFIG_SELFMOD_INTC) || defined(CONFIG_SELFMOD_TIMER) 69#if defined(CONFIG_SELFMOD_INTC) || defined(CONFIG_SELFMOD_TIMER)