1 // SPDX-License-Identifier: GPL-2.0 2 3 #include <linux/io.h> 4 #include <linux/processor.h> 5 6 #include <asm/sn/ioc3.h> 7 #include <asm/setup.h> 8 9 static inline struct ioc3_uartregs *console_uart(void) 10 { 11 struct ioc3 *ioc3; 12 13 ioc3 = (struct ioc3 *)((void *)(0x900000001f600000)); 14 return &ioc3->sregs.uarta; 15 } 16 17 void prom_putchar(char c) 18 { 19 struct ioc3_uartregs *uart = console_uart(); 20 21 while ((readb(&uart->iu_lsr) & 0x20) == 0) 22 cpu_relax(); 23 24 writeb(c, &uart->iu_thr); 25 } 26