aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r--arch/mips/txx9/generic/setup.c31
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
275static void __init null_prom_putchar(char c)
276{
277}
278void (*txx9_prom_putchar)(char c) __initdata = null_prom_putchar;
279
280void __init prom_putchar(char c)
281{
282 txx9_prom_putchar(c);
283}
284
285static void __iomem *early_txx9_sio_port;
286
287static 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
298void __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 */
275void __init plat_mem_setup(void) 306void __init plat_mem_setup(void)
276{ 307{