diff options
author | Thomas Bogendoerfer <tbogendoerfer@suse.de> | 2019-08-30 11:25:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-30 13:54:35 -0700 |
commit | cbe7d51745f9334d05bf2fdd915322e159bbcaa8 (patch) | |
tree | ea0b245b716e6e3116c8c2f609a029cce6b94770 /arch/mips/sgi-ip27 | |
parent | 688125a6e7872a8c827d7848ba8fbc41785fb9c6 (diff) | |
download | linux-cbe7d51745f9334d05bf2fdd915322e159bbcaa8.tar.bz2 |
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 <tbogendoerfer@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/mips/sgi-ip27')
-rw-r--r-- | arch/mips/sgi-ip27/ip27-console.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |