Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / mips / sgi-ip30 / ip30-console.c
blobb91f8c4fdc786011172f8111e7e0dfc3e04705e1
1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/io.h>
5 #include <asm/sn/ioc3.h>
7 static inline struct ioc3_uartregs *console_uart(void)
9 struct ioc3 *ioc3;
11 ioc3 = (struct ioc3 *)((void *)(0x900000001f600000));
12 return &ioc3->sregs.uarta;
15 void prom_putchar(char c)
17 struct ioc3_uartregs *uart = console_uart();
19 while ((readb(&uart->iu_lsr) & 0x20) == 0)
20 cpu_relax();
22 writeb(c, &uart->iu_thr);