diff options
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 94ce1a5c38a4..1bc57d0f4c5c 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -271,6 +271,37 @@ void __init txx9_sio_init(unsigned long baseaddr, int irq, | |||
271 | #endif /* CONFIG_SERIAL_TXX9 */ | 271 | #endif /* CONFIG_SERIAL_TXX9 */ |
272 | } | 272 | } |
273 | 273 | ||
274 | #ifdef CONFIG_EARLY_PRINTK | ||
275 | static void __init null_prom_putchar(char c) | ||
276 | { | ||
277 | } | ||
278 | void (*txx9_prom_putchar)(char c) __initdata = null_prom_putchar; | ||
279 | |||
280 | void __init prom_putchar(char c) | ||
281 | { | ||
282 | txx9_prom_putchar(c); | ||
283 | } | ||
284 | |||
285 | static void __iomem *early_txx9_sio_port; | ||
286 | |||
287 | static void __init early_txx9_sio_putchar(char c) | ||
288 | { | ||
289 | #define TXX9_SICISR 0x0c | ||
290 | #define TXX9_SITFIFO 0x1c | ||
291 | #define TXX9_SICISR_TXALS 0x00000002 | ||
292 | while (!(__raw_readl(early_txx9_sio_port + TXX9_SICISR) & | ||
293 | TXX9_SICISR_TXALS)) | ||
294 | ; | ||
295 | __raw_writel(c, early_txx9_sio_port + TXX9_SITFIFO); | ||
296 | } | ||
297 | |||
298 | void __init txx9_sio_putchar_init(unsigned long baseaddr) | ||
299 | { | ||
300 | early_txx9_sio_port = ioremap(baseaddr, 0x24); | ||
301 | txx9_prom_putchar = early_txx9_sio_putchar; | ||
302 | } | ||
303 | #endif /* CONFIG_EARLY_PRINTK */ | ||
304 | |||
274 | /* wrappers */ | 305 | /* wrappers */ |
275 | void __init plat_mem_setup(void) | 306 | void __init plat_mem_setup(void) |
276 | { | 307 | { |