mirror of https://github.com/Qortal/Brooklyn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
414 B
24 lines
414 B
3 years ago
|
// 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);
|
||
|
}
|