This source file includes following definitions.
- prom_printf
1
2
3
4
5
6
7
8
9
10
11 #include <linux/config.h>
12 #include <linux/kernel.h>
13
14 #include <asm/openprom.h>
15 #include <asm/oplib.h>
16
17 static char ppbuf[1024];
18
19 void
20 prom_printf(char *fmt, ...)
21 {
22 va_list args;
23 char ch, *bptr;
24 int i;
25
26 va_start(args, fmt);
27 i = vsprintf(ppbuf, fmt, args);
28
29 bptr = ppbuf;
30
31 #if CONFIG_AP1000
32 ap_write(1,bptr,strlen(bptr));
33 #else
34 while((ch = *(bptr++)) != 0) {
35 if(ch == '\n')
36 prom_putchar('\r');
37
38 prom_putchar(ch);
39 }
40 #endif
41 va_end(args);
42 return;
43 }