diff options
Diffstat (limited to 'arch/mips/arc')
-rw-r--r-- | arch/mips/arc/console.c | 32 | ||||
-rw-r--r-- | arch/mips/arc/init.c | 9 | ||||
-rw-r--r-- | arch/mips/arc/memory.c | 6 | ||||
-rw-r--r-- | arch/mips/arc/tree.c | 10 |
4 files changed, 14 insertions, 43 deletions
diff --git a/arch/mips/arc/console.c b/arch/mips/arc/console.c index 6a9d144512c0..0fe6032999cb 100644 --- a/arch/mips/arc/console.c +++ b/arch/mips/arc/console.c | |||
@@ -29,35 +29,3 @@ void prom_putchar(char c) | |||
29 | ArcWrite(1, &it, 1, &cnt); | 29 | ArcWrite(1, &it, 1, &cnt); |
30 | bc_enable(); | 30 | bc_enable(); |
31 | } | 31 | } |
32 | |||
33 | char prom_getchar(void) | ||
34 | { | ||
35 | ULONG cnt; | ||
36 | CHAR c; | ||
37 | |||
38 | bc_disable(); | ||
39 | ArcRead(0, &c, 1, &cnt); | ||
40 | bc_enable(); | ||
41 | |||
42 | return c; | ||
43 | } | ||
44 | |||
45 | void prom_printf(char *fmt, ...) | ||
46 | { | ||
47 | va_list args; | ||
48 | char ppbuf[1024]; | ||
49 | char *bptr; | ||
50 | |||
51 | va_start(args, fmt); | ||
52 | vsprintf(ppbuf, fmt, args); | ||
53 | |||
54 | bptr = ppbuf; | ||
55 | |||
56 | while (*bptr != 0) { | ||
57 | if (*bptr == '\n') | ||
58 | prom_putchar('\r'); | ||
59 | |||
60 | prom_putchar(*bptr++); | ||
61 | } | ||
62 | va_end(args); | ||
63 | } | ||
diff --git a/arch/mips/arc/init.c b/arch/mips/arc/init.c index 76ab505ca693..0ac8f42d3752 100644 --- a/arch/mips/arc/init.c +++ b/arch/mips/arc/init.c | |||
@@ -24,12 +24,15 @@ void __init prom_init(void) | |||
24 | { | 24 | { |
25 | PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK; | 25 | PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK; |
26 | romvec = ROMVECTOR; | 26 | romvec = ROMVECTOR; |
27 | ULONG cnt; | ||
28 | CHAR c; | ||
29 | |||
27 | prom_argc = fw_arg0; | 30 | prom_argc = fw_arg0; |
28 | _prom_argv = (LONG *) fw_arg1; | 31 | _prom_argv = (LONG *) fw_arg1; |
29 | _prom_envp = (LONG *) fw_arg2; | 32 | _prom_envp = (LONG *) fw_arg2; |
30 | 33 | ||
31 | if (pb->magic != 0x53435241) { | 34 | if (pb->magic != 0x53435241) { |
32 | prom_printf("Aieee, bad prom vector magic %08lx\n", pb->magic); | 35 | printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n", pb->magic); |
33 | while(1) | 36 | while(1) |
34 | ; | 37 | ; |
35 | } | 38 | } |
@@ -41,8 +44,8 @@ void __init prom_init(void) | |||
41 | prom_meminit(); | 44 | prom_meminit(); |
42 | 45 | ||
43 | #ifdef DEBUG_PROM_INIT | 46 | #ifdef DEBUG_PROM_INIT |
44 | prom_printf("Press a key to reboot\n"); | 47 | pr_info("Press a key to reboot\n"); |
45 | prom_getchar(); | 48 | ArcRead(0, &c, 1, &cnt); |
46 | ArcEnterInteractiveMode(); | 49 | ArcEnterInteractiveMode(); |
47 | #endif | 50 | #endif |
48 | } | 51 | } |
diff --git a/arch/mips/arc/memory.c b/arch/mips/arc/memory.c index 456cb81a32d9..83d15791ef6a 100644 --- a/arch/mips/arc/memory.c +++ b/arch/mips/arc/memory.c | |||
@@ -118,11 +118,11 @@ void __init prom_meminit(void) | |||
118 | #ifdef DEBUG | 118 | #ifdef DEBUG |
119 | int i = 0; | 119 | int i = 0; |
120 | 120 | ||
121 | prom_printf("ARCS MEMORY DESCRIPTOR dump:\n"); | 121 | printk("ARCS MEMORY DESCRIPTOR dump:\n"); |
122 | p = ArcGetMemoryDescriptor(PROM_NULL_MDESC); | 122 | p = ArcGetMemoryDescriptor(PROM_NULL_MDESC); |
123 | while(p) { | 123 | while(p) { |
124 | prom_printf("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n", | 124 | printk("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n", |
125 | i, p, p->base, p->pages, mtypes(p->type)); | 125 | i, p, p->base, p->pages, mtypes(p->type)); |
126 | p = ArcGetMemoryDescriptor(p); | 126 | p = ArcGetMemoryDescriptor(p); |
127 | i++; | 127 | i++; |
128 | } | 128 | } |
diff --git a/arch/mips/arc/tree.c b/arch/mips/arc/tree.c index 2aedd4f52839..abd1786ea09b 100644 --- a/arch/mips/arc/tree.c +++ b/arch/mips/arc/tree.c | |||
@@ -93,11 +93,11 @@ static char *iflags[] = { | |||
93 | static void __init | 93 | static void __init |
94 | dump_component(pcomponent *p) | 94 | dump_component(pcomponent *p) |
95 | { | 95 | { |
96 | prom_printf("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>", | 96 | printk("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>", |
97 | p, classes[p->class], types[p->type], | 97 | p, classes[p->class], types[p->type], |
98 | iflags[p->iflags], p->vers, p->rev); | 98 | iflags[p->iflags], p->vers, p->rev); |
99 | prom_printf("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n", | 99 | printk("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n", |
100 | p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname); | 100 | p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname); |
101 | } | 101 | } |
102 | 102 | ||
103 | static void __init | 103 | static void __init |