diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-03-01 06:56:43 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-04 14:02:37 -0500 |
commit | 36a885306fdf7bb557c773309c993bfb2d0d693c (patch) | |
tree | 643b246c90653c9451ff7fecff74a79c3de8042c /arch/mips/mips-boards/generic | |
parent | ca471c86043f4a8b01cba02ba2d3431fddcaf606 (diff) |
[MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.
early_printk is a so much saner thing.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mips-boards/generic')
-rw-r--r-- | arch/mips/mips-boards/generic/Makefile | 4 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/console.c (renamed from arch/mips/mips-boards/generic/printf.c) | 12 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/init.c | 9 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/memory.c | 11 |
4 files changed, 15 insertions, 21 deletions
diff --git a/arch/mips/mips-boards/generic/Makefile b/arch/mips/mips-boards/generic/Makefile index 0a30f5dc9b72..aade36d78787 100644 --- a/arch/mips/mips-boards/generic/Makefile +++ b/arch/mips/mips-boards/generic/Makefile | |||
@@ -18,7 +18,9 @@ | |||
18 | # Makefile for the MIPS boards generic routines under Linux. | 18 | # Makefile for the MIPS boards generic routines under Linux. |
19 | # | 19 | # |
20 | 20 | ||
21 | obj-y := reset.o display.o init.o memory.o printf.o \ | 21 | obj-y := reset.o display.o init.o memory.o \ |
22 | cmdline.o time.o | 22 | cmdline.o time.o |
23 | |||
24 | obj-$(CONFIG_EARLY_PRINTK) += console.o | ||
23 | obj-$(CONFIG_PCI) += pci.o | 25 | obj-$(CONFIG_PCI) += pci.o |
24 | obj-$(CONFIG_KGDB) += gdb_hook.o | 26 | obj-$(CONFIG_KGDB) += gdb_hook.o |
diff --git a/arch/mips/mips-boards/generic/printf.c b/arch/mips/mips-boards/generic/console.c index 1a711bd79b51..4d8ab99e4155 100644 --- a/arch/mips/mips-boards/generic/printf.c +++ b/arch/mips/mips-boards/generic/console.c | |||
@@ -17,10 +17,9 @@ | |||
17 | * | 17 | * |
18 | * Putting things on the screen/serial line using YAMONs facilities. | 18 | * Putting things on the screen/serial line using YAMONs facilities. |
19 | */ | 19 | */ |
20 | #include <linux/console.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/kernel.h> | ||
22 | #include <linux/serial_reg.h> | 22 | #include <linux/serial_reg.h> |
23 | #include <linux/spinlock.h> | ||
24 | #include <asm/io.h> | 23 | #include <asm/io.h> |
25 | 24 | ||
26 | #ifdef CONFIG_MIPS_ATLAS | 25 | #ifdef CONFIG_MIPS_ATLAS |
@@ -67,12 +66,3 @@ int prom_putchar(char c) | |||
67 | 66 | ||
68 | return 1; | 67 | return 1; |
69 | } | 68 | } |
70 | |||
71 | char prom_getchar(void) | ||
72 | { | ||
73 | while (!(serial_in(UART_LSR) & UART_LSR_DR)) | ||
74 | ; | ||
75 | |||
76 | return serial_in(UART_RX); | ||
77 | } | ||
78 | |||
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index 58a0fe883591..b11337600129 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c | |||
@@ -167,7 +167,7 @@ static void __init console_config(void) | |||
167 | flow = 'r'; | 167 | flow = 'r'; |
168 | sprintf (console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow); | 168 | sprintf (console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow); |
169 | strcat (prom_getcmdline(), console_string); | 169 | strcat (prom_getcmdline(), console_string); |
170 | prom_printf("Config serial console:%s\n", console_string); | 170 | pr_info("Config serial console:%s\n", console_string); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | #endif | 173 | #endif |
@@ -210,8 +210,9 @@ void __init kgdb_config (void) | |||
210 | generic_getDebugChar = rs_getDebugChar; | 210 | generic_getDebugChar = rs_getDebugChar; |
211 | } | 211 | } |
212 | 212 | ||
213 | prom_printf("KGDB: Using serial line /dev/ttyS%d at %d for session, " | 213 | pr_info("KGDB: Using serial line /dev/ttyS%d at %d for " |
214 | "please connect your debugger\n", line ? 1 : 0, speed); | 214 | "session, please connect your debugger\n", |
215 | line ? 1 : 0, speed); | ||
215 | 216 | ||
216 | { | 217 | { |
217 | char *s; | 218 | char *s; |
@@ -382,7 +383,7 @@ void __init prom_init(void) | |||
382 | board_nmi_handler_setup = mips_nmi_setup; | 383 | board_nmi_handler_setup = mips_nmi_setup; |
383 | board_ejtag_handler_setup = mips_ejtag_setup; | 384 | board_ejtag_handler_setup = mips_ejtag_setup; |
384 | 385 | ||
385 | prom_printf("\nLINUX started...\n"); | 386 | pr_info("\nLINUX started...\n"); |
386 | prom_init_cmdline(); | 387 | prom_init_cmdline(); |
387 | prom_meminit(); | 388 | prom_meminit(); |
388 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 389 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index ebf0e16c5a0d..ae39953da2c4 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c | |||
@@ -59,11 +59,12 @@ struct prom_pmemblock * __init prom_getmdesc(void) | |||
59 | /* otherwise look in the environment */ | 59 | /* otherwise look in the environment */ |
60 | memsize_str = prom_getenv("memsize"); | 60 | memsize_str = prom_getenv("memsize"); |
61 | if (!memsize_str) { | 61 | if (!memsize_str) { |
62 | prom_printf("memsize not set in boot prom, set to default (32Mb)\n"); | 62 | printk(KERN_WARNING |
63 | "memsize not set in boot prom, set to default (32Mb)\n"); | ||
63 | physical_memsize = 0x02000000; | 64 | physical_memsize = 0x02000000; |
64 | } else { | 65 | } else { |
65 | #ifdef DEBUG | 66 | #ifdef DEBUG |
66 | prom_printf("prom_memsize = %s\n", memsize_str); | 67 | pr_debug("prom_memsize = %s\n", memsize_str); |
67 | #endif | 68 | #endif |
68 | physical_memsize = simple_strtol(memsize_str, NULL, 0); | 69 | physical_memsize = simple_strtol(memsize_str, NULL, 0); |
69 | } | 70 | } |
@@ -141,12 +142,12 @@ void __init prom_meminit(void) | |||
141 | struct prom_pmemblock *p; | 142 | struct prom_pmemblock *p; |
142 | 143 | ||
143 | #ifdef DEBUG | 144 | #ifdef DEBUG |
144 | prom_printf("YAMON MEMORY DESCRIPTOR dump:\n"); | 145 | pr_debug("YAMON MEMORY DESCRIPTOR dump:\n"); |
145 | p = prom_getmdesc(); | 146 | p = prom_getmdesc(); |
146 | while (p->size) { | 147 | while (p->size) { |
147 | int i = 0; | 148 | int i = 0; |
148 | prom_printf("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n", | 149 | pr_debug("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n", |
149 | i, p, p->base, p->size, mtypes[p->type]); | 150 | i, p, p->base, p->size, mtypes[p->type]); |
150 | p++; | 151 | p++; |
151 | i++; | 152 | i++; |
152 | } | 153 | } |