OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [sparc/] [prom/] [printf.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1624 jcastillo
/* $Id: printf.c,v 1.1 2005-12-20 09:49:32 jcastillo Exp $
2
 * printf.c:  Internal prom library printf facility.
3
 *
4
 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
5
 */
6
 
7
/* This routine is internal to the prom library, no one else should know
8
 * about or use it!  It's simple and smelly anyway....
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.