1 // SPDX-License-Identifier: GPL-2.0
2 /* console.c: Routines that deal with sending and receiving IO
3 * to/from the current console device using the PROM.
5 * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
6 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
9 #include <linux/types.h>
10 #include <linux/kernel.h>
11 #include <linux/sched.h>
12 #include <asm/openprom.h>
13 #include <asm/oplib.h>
14 #include <linux/string.h>
16 static int __prom_console_write_buf(const char *buf
, int len
)
18 unsigned long args
[7];
21 args
[0] = (unsigned long) "write";
24 args
[3] = (unsigned int) prom_stdout
;
25 args
[4] = (unsigned long) buf
;
26 args
[5] = (unsigned int) len
;
27 args
[6] = (unsigned long) -1;
29 p1275_cmd_direct(args
);
37 void prom_console_write_buf(const char *buf
, int len
)
40 int n
= __prom_console_write_buf(buf
, len
);