From cbe7d51745f9334d05bf2fdd915322e159bbcaa8 Mon Sep 17 00:00:00 2001 From: Thomas Bogendoerfer Date: Fri, 30 Aug 2019 11:25:25 +0200 Subject: MIPS: SGI-IP27: restructure ioc3 register access Break up the big ioc3 register struct into functional pieces to make use in sub-function drivers more straightforward. And while doing that get rid of all volatile access by using readX/writeX. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller --- arch/mips/sgi-ip27/ip27-console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/mips/sgi-ip27') diff --git a/arch/mips/sgi-ip27/ip27-console.c b/arch/mips/sgi-ip27/ip27-console.c index 6bdb48d41276..5886bee89d06 100644 --- a/arch/mips/sgi-ip27/ip27-console.c +++ b/arch/mips/sgi-ip27/ip27-console.c @@ -35,6 +35,7 @@ void prom_putchar(char c) { struct ioc3_uartregs *uart = console_uart(); - while ((uart->iu_lsr & 0x20) == 0); - uart->iu_thr = c; + while ((readb(&uart->iu_lsr) & 0x20) == 0) + ; + writeb(c, &uart->iu_thr); } -- cgit v1.2.3