2a7a6f9a03
commit 8de4ed75bd14ed197119ac509c6902a8561e0c1c upstream. Include linux/processor.h to fix build error: arch/mips/sgi-ip30/ip30-console.c: In function ‘prom_putchar’: arch/mips/sgi-ip30/ip30-console.c:21:17: error: implicit declaration of function ‘cpu_relax’ [-Werror=implicit-function-declaration] 21 | cpu_relax(); Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 lines
443 B
C
Executable file
24 lines
443 B
C
Executable file
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/io.h>
|
|
#include <linux/processor.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);
|
|
}
|