2 * print.c: Simple print fascility
4 * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
7 #include <linux/kernel.h>
8 #include <linux/init.h>
10 #include <asm/baget/baget.h>
13 * Define this to see 'baget_printk' (debug) messages
15 // #define BAGET_PRINTK
18 * This function is same for BALO and Linux baget_printk,
19 * and normally prints characted to second (UART A) console.
22 static void delay(void) {}
24 static void outc_low(char c
)
27 vac_outb(c
, VAC_UART_B_TX
);
28 for (i
=0; i
<10000; i
++)
44 void baget_write(char *s
, int l
)
50 int baget_printk(const char *fmt
, ...)
55 static char buf
[1024];
58 i
= vsprintf(buf
, fmt
, args
); /* hopefully i < sizeof(buf)-4 */
67 static __inline__
void puthex( int a
)
70 static char e
[] = "0123456789ABCDEF";
72 for( i
= 7; i
>= 0; i
--, a
>>= 4 ) s
[i
] = e
[a
& 0x0F];
77 void __init
balo_printf( char *f
, ... )
79 int *arg
= (int*)&f
+ 1;
83 while((c
= *f
++) != 0) {
99 if(format
) puthex( *arg
++ );
104 if( format
) outs((char *)*arg
++);
112 void __init
balo_hungup(void)
114 outs("Hunging up.\n");