diff options
author | Thomas Bogendoerfer <tbogendoerfer@suse.de> | 2019-10-24 12:18:29 +0200 |
---|---|---|
committer | Paul Burton <paulburton@kernel.org> | 2019-11-01 14:58:56 -0700 |
commit | 7505576d1c1ac0cfe85fdf90999433dd8b673012 (patch) | |
tree | 51a15f2d600164ec4c72b9a4c71c7e174d1a8847 /arch/mips/sgi-ip30/ip30-console.c | |
parent | b9e9defb5e603a8c0822c9e1f457fc823fab5a15 (diff) | |
download | linux-stable-7505576d1c1ac0cfe85fdf90999433dd8b673012.tar.gz linux-stable-7505576d1c1ac0cfe85fdf90999433dd8b673012.tar.bz2 linux-stable-7505576d1c1ac0cfe85fdf90999433dd8b673012.zip |
MIPS: add support for SGI Octane (IP30)
This changeset adds support for SGI Octane/Octane2 workstations.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'arch/mips/sgi-ip30/ip30-console.c')
-rw-r--r-- | arch/mips/sgi-ip30/ip30-console.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/sgi-ip30/ip30-console.c b/arch/mips/sgi-ip30/ip30-console.c new file mode 100644 index 000000000000..b91f8c4fdc78 --- /dev/null +++ b/arch/mips/sgi-ip30/ip30-console.c @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/io.h> + +#include <asm/sn/ioc3.h> + +static inline struct ioc3_uartregs *console_uart(void) +{ + struct ioc3 *ioc3; + + ioc3 = (struct ioc3 *)((void *)(0x900000001f600000)); + return &ioc3->sregs.uarta; +} + +void prom_putchar(char c) +{ + struct ioc3_uartregs *uart = console_uart(); + + while ((readb(&uart->iu_lsr) & 0x20) == 0) + cpu_relax(); + + writeb(c, &uart->iu_thr); +} |