[MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.
authorRalf Baechle <ralf@linux-mips.org>
Thu, 1 Mar 2007 11:56:43 +0000 (11:56 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 4 Mar 2007 19:02:37 +0000 (19:02 +0000)
early_printk is a so much saner thing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
44 files changed:
arch/mips/Kconfig
arch/mips/arc/console.c
arch/mips/arc/init.c
arch/mips/arc/memory.c
arch/mips/arc/tree.c
arch/mips/cobalt/console.c
arch/mips/cobalt/setup.c
arch/mips/dec/prom/console.c
arch/mips/gt64120/ev64120/promcon.c
arch/mips/kernel/Makefile
arch/mips/kernel/early_printk.c [new file with mode: 0644]
arch/mips/kernel/setup.c
arch/mips/lasat/lasat_board.c
arch/mips/lasat/prom.c
arch/mips/lasat/prom.h
arch/mips/lasat/setup.c
arch/mips/lib/Makefile
arch/mips/lib/promlib.c [deleted file]
arch/mips/mips-boards/generic/Makefile
arch/mips/mips-boards/generic/console.c [new file with mode: 0644]
arch/mips/mips-boards/generic/init.c
arch/mips/mips-boards/generic/memory.c
arch/mips/mips-boards/generic/printf.c [deleted file]
arch/mips/mips-boards/sim/Makefile
arch/mips/mips-boards/sim/sim_console.c [new file with mode: 0644]
arch/mips/mips-boards/sim/sim_mem.c
arch/mips/mips-boards/sim/sim_printf.c [deleted file]
arch/mips/mips-boards/sim/sim_setup.c
arch/mips/mm/cerr-sb1.c
arch/mips/momentum/jaguar_atx/ja-console.c
arch/mips/philips/pnx8550/common/prom.c
arch/mips/philips/pnx8550/common/setup.c
arch/mips/pmc-sierra/yosemite/py-console.c
arch/mips/sgi-ip27/ip27-console.c
arch/mips/sibyte/Kconfig
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/bcm1480/setup.c
arch/mips/sibyte/cfe/setup.c
arch/mips/sibyte/sb1250/setup.c
arch/mips/sni/sniprom.c
include/asm-mips/lasat/lasat.h
include/asm-mips/mips-boards/prom.h
include/asm-mips/sgialib.h
include/asm-mips/sibyte/sb1250.h

index e7e880b874560f24ab21bcfb9225637b94ac22cf..4ec2dd5455f37b3e720fa952af7f8bdb42a48edd 100644 (file)
@@ -176,7 +176,7 @@ config MACH_DECSTATION
        bool "DECstations"
        select BOOT_ELF32
        select DMA_NONCOHERENT
        bool "DECstations"
        select BOOT_ELF32
        select DMA_NONCOHERENT
-       select EARLY_PRINTK
+       select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
        select SYS_HAS_CPU_R3000
        select SYS_HAS_CPU_R4X00
        select IRQ_CPU
        select SYS_HAS_CPU_R3000
        select SYS_HAS_CPU_R4X00
@@ -242,6 +242,7 @@ config MACH_JAZZ
 config LASAT
        bool "LASAT Networks platforms"
        select DMA_NONCOHERENT
 config LASAT
        bool "LASAT Networks platforms"
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select HW_HAS_PCI
        select MIPS_GT64120
        select MIPS_NILE4
        select HW_HAS_PCI
        select MIPS_GT64120
        select MIPS_NILE4
@@ -256,6 +257,7 @@ config MIPS_ATLAS
        bool "MIPS Atlas board"
        select BOOT_ELF32
        select DMA_NONCOHERENT
        bool "MIPS Atlas board"
        select BOOT_ELF32
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
        select HW_HAS_PCI
        select MIPS_BOARDS_GEN
        select IRQ_CPU
        select HW_HAS_PCI
        select MIPS_BOARDS_GEN
@@ -301,6 +303,7 @@ config MIPS_MALTA
        select SYS_HAS_CPU_MIPS64_R1
        select SYS_HAS_CPU_NEVADA
        select SYS_HAS_CPU_RM7000
        select SYS_HAS_CPU_MIPS64_R1
        select SYS_HAS_CPU_NEVADA
        select SYS_HAS_CPU_RM7000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -316,6 +319,7 @@ config MIPS_SEAD
        depends on EXPERIMENTAL
        select IRQ_CPU
        select DMA_NONCOHERENT
        depends on EXPERIMENTAL
        select IRQ_CPU
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select MIPS_BOARDS_GEN
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
        select MIPS_BOARDS_GEN
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
@@ -353,9 +357,11 @@ config WR_PPMC
 config MIPS_SIM
        bool 'MIPS simulator (MIPSsim)'
        select DMA_NONCOHERENT
 config MIPS_SIM
        bool 'MIPS simulator (MIPSsim)'
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
        select IRQ_CPU
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_LITTLE_ENDIAN
@@ -376,6 +382,7 @@ config MOMENCO_JAGUAR_ATX
        select RM7000_CPU_SCACHE
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_RM9000
        select RM7000_CPU_SCACHE
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_RM9000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -513,6 +520,7 @@ config PMC_YOSEMITE
        select IRQ_CPU_RM9K
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_RM9000
        select IRQ_CPU_RM9K
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_RM9000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -573,6 +581,7 @@ config SGI_IP22
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_R4X00
        select SYS_HAS_CPU_R5000
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_R4X00
        select SYS_HAS_CPU_R5000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -587,7 +596,7 @@ config SGI_IP27
        select ARC64
        select BOOT_ELF64
        select DMA_IP27
        select ARC64
        select BOOT_ELF64
        select DMA_IP27
-       select EARLY_PRINTK
+       select SYS_HAS_EARLY_PRINTK
        select HW_HAS_PCI
        select NR_CPUS_DEFAULT_64
        select PCI_DOMAINS
        select HW_HAS_PCI
        select NR_CPUS_DEFAULT_64
        select PCI_DOMAINS
@@ -749,6 +758,7 @@ config SNI_RM
        select SYS_HAS_CPU_R5000
        select SYS_HAS_CPU_R10000
        select R5000_CPU_SCACHE
        select SYS_HAS_CPU_R5000
        select SYS_HAS_CPU_R10000
        select R5000_CPU_SCACHE
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -897,6 +907,20 @@ config DMA_NEED_PCI_MAP_STATE
        bool
 
 config EARLY_PRINTK
        bool
 
 config EARLY_PRINTK
+       bool "Early printk" if EMBEDDED && DEBUG_KERNEL
+       depends on SYS_HAS_EARLY_PRINTK
+       default y
+       help
+         This option enables special console drivers which allow the kernel
+         to print messages very early in the bootup process.
+
+         This is useful for kernel debugging when your machine crashes very
+         early before the console code is initialized. For normal operation
+         it is not recommended because it looks on some machines ugly and
+         oesn't cooperate with an X server. You should normally N here,
+         unless you want to debug such a crash.
+
+config SYS_HAS_EARLY_PRINTK
        bool
 
 config GENERIC_ISA_DMA
        bool
 
 config GENERIC_ISA_DMA
@@ -1033,6 +1057,7 @@ config SOC_PNX8550
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select SYS_HAS_CPU_MIPS32_R1
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select SYS_HAS_CPU_MIPS32_R1
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select GENERIC_HARDIRQS_NO__DO_IRQ
        select SYS_SUPPORTS_KGDB
        select SYS_SUPPORTS_32BIT_KERNEL
        select GENERIC_HARDIRQS_NO__DO_IRQ
        select SYS_SUPPORTS_KGDB
@@ -1093,7 +1118,7 @@ config HAVE_STD_PC_SERIAL_PORT
 
 config ARC_CONSOLE
        bool "ARC console support"
 
 config ARC_CONSOLE
        bool "ARC console support"
-       depends on SGI_IP22 || SNI_RM
+       depends on SGI_IP22 || (SNI_RM && CPU_LITTLE_ENDIAN)
 
 config ARC_MEMORY
        bool
 
 config ARC_MEMORY
        bool
index 6a9d144512c01dcb34d58517d7fbb94140b22155..0fe6032999cbc4f2ff602c7c791490e68bb981e8 100644 (file)
@@ -29,35 +29,3 @@ void prom_putchar(char c)
        ArcWrite(1, &it, 1, &cnt);
        bc_enable();
 }
        ArcWrite(1, &it, 1, &cnt);
        bc_enable();
 }
-
-char prom_getchar(void)
-{
-       ULONG cnt;
-       CHAR c;
-
-       bc_disable();
-       ArcRead(0, &c, 1, &cnt);
-       bc_enable();
-
-       return c;
-}
-
-void prom_printf(char *fmt, ...)
-{
-       va_list args;
-       char ppbuf[1024];
-       char *bptr;
-
-       va_start(args, fmt);
-       vsprintf(ppbuf, fmt, args);
-
-       bptr = ppbuf;
-
-       while (*bptr != 0) {
-               if (*bptr == '\n')
-                       prom_putchar('\r');
-
-               prom_putchar(*bptr++);
-       }
-       va_end(args);
-}
index 76ab505ca69302e59c43cc8eb974d4e77457f888..0ac8f42d37525b5040fd31584d0318e561e15af8 100644 (file)
@@ -24,12 +24,15 @@ void __init prom_init(void)
 {
        PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
        romvec = ROMVECTOR;
 {
        PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
        romvec = ROMVECTOR;
+       ULONG cnt;
+       CHAR c;
+
        prom_argc = fw_arg0;
        _prom_argv = (LONG *) fw_arg1;
        _prom_envp = (LONG *) fw_arg2;
 
        if (pb->magic != 0x53435241) {
        prom_argc = fw_arg0;
        _prom_argv = (LONG *) fw_arg1;
        _prom_envp = (LONG *) fw_arg2;
 
        if (pb->magic != 0x53435241) {
-               prom_printf("Aieee, bad prom vector magic %08lx\n", pb->magic);
+               printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n", pb->magic);
                while(1)
                        ;
        }
                while(1)
                        ;
        }
@@ -41,8 +44,8 @@ void __init prom_init(void)
        prom_meminit();
 
 #ifdef DEBUG_PROM_INIT
        prom_meminit();
 
 #ifdef DEBUG_PROM_INIT
-       prom_printf("Press a key to reboot\n");
-       prom_getchar();
+       pr_info("Press a key to reboot\n");
+       ArcRead(0, &c, 1, &cnt);
        ArcEnterInteractiveMode();
 #endif
 }
        ArcEnterInteractiveMode();
 #endif
 }
index 456cb81a32d9c88edb5d9abba1138f37cccb30aa..83d15791ef6a589a596e2004b7e2de1ccd11867d 100644 (file)
@@ -118,11 +118,11 @@ void __init prom_meminit(void)
 #ifdef DEBUG
        int i = 0;
 
 #ifdef DEBUG
        int i = 0;
 
-       prom_printf("ARCS MEMORY DESCRIPTOR dump:\n");
+       printk("ARCS MEMORY DESCRIPTOR dump:\n");
        p = ArcGetMemoryDescriptor(PROM_NULL_MDESC);
        while(p) {
        p = ArcGetMemoryDescriptor(PROM_NULL_MDESC);
        while(p) {
-               prom_printf("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n",
-                           i, p, p->base, p->pages, mtypes(p->type));
+               printk("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n",
+                      i, p, p->base, p->pages, mtypes(p->type));
                p = ArcGetMemoryDescriptor(p);
                i++;
        }
                p = ArcGetMemoryDescriptor(p);
                i++;
        }
index 2aedd4f528392632e788a3ea7d43a072deb03be5..abd1786ea09b13bd33ecabacc5508c69590e0840 100644 (file)
@@ -93,11 +93,11 @@ static char *iflags[] = {
 static void __init
 dump_component(pcomponent *p)
 {
 static void __init
 dump_component(pcomponent *p)
 {
-       prom_printf("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>",
-                   p, classes[p->class], types[p->type],
-                   iflags[p->iflags], p->vers, p->rev);
-       prom_printf("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n",
-                   p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname);
+       printk("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>",
+              p, classes[p->class], types[p->type],
+              iflags[p->iflags], p->vers, p->rev);
+       printk("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n",
+              p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname);
 }
 
 static void __init
 }
 
 static void __init
index 46c23b66bc171883d2d9ae2e58dc8d750ffd7bab..fff20d28114fe893c3dbd0adcabd4f3a61b5f8d1 100644 (file)
@@ -19,29 +19,3 @@ static void putchar(int c)
 
        COBALT_UART[UART_TX] = c;
 }
 
        COBALT_UART[UART_TX] = c;
 }
-
-static void cons_write(struct console *c, const char *s, unsigned n)
-{
-       while(n-- && *s)
-               putchar(*s++);
-}
-
-static struct console cons_info =
-{
-       .name   = "uart",
-       .write  = cons_write,
-       .flags  = CON_PRINTBUFFER | CON_BOOT,
-       .index  = -1,
-};
-
-void __init cobalt_early_console(void)
-{
-       register_console(&cons_info);
-
-       printk("Cobalt: early console registered\n");
-}
-
-void __init disable_early_printk(void)
-{
-       unregister_console(&cons_info);
-}
index 415ff8710b553d3e76ea3f0589d70da63cedbb67..d2340587671cf3b822e6156cd25a7f673155f46d 100644 (file)
@@ -150,10 +150,6 @@ void __init plat_mem_setup(void)
 #endif
 
        if (cobalt_board_id > COBALT_BRD_ID_RAQ1) {
 #endif
 
        if (cobalt_board_id > COBALT_BRD_ID_RAQ1) {
-#ifdef CONFIG_EARLY_PRINTK
-               cobalt_early_console();
-#endif
-
 #ifdef CONFIG_SERIAL_8250
                uart.line       = 0;
                uart.type       = PORT_UNKNOWN;
 #ifdef CONFIG_SERIAL_8250
                uart.line       = 0;
                uart.type       = PORT_UNKNOWN;
index cade16ec7e5a2c140e79f6c9acbad5ede7b80978..65419bf32441be996b689a28790a1a610dcc8d37 100644 (file)
 
 #include <asm/dec/prom.h>
 
 
 #include <asm/dec/prom.h>
 
-static void __init prom_console_write(struct console *con, const char *s,
-                                     unsigned int c)
+void prom_putchar(char c)
 {
 {
-       static char sfmt[] __initdata = "%%%us";
-       char fmt[13];
+       char s[2];
 
 
-       snprintf(fmt, sizeof(fmt), sfmt, c);
-       prom_printf(fmt, s);
-}
-
-static struct console promcons __initdata = {
-       .name   = "prom",
-       .write  = prom_console_write,
-       .flags  = CON_PRINTBUFFER,
-       .index  = -1,
-};
-
-static int promcons_output __initdata = 0;
-
-void __init register_prom_console(void)
-{
-       if (!promcons_output) {
-               promcons_output = 1;
-               register_console(&promcons);
-       }
-}
+       s[0] = c;
+       s[1] = '\0';
 
 
-void __init unregister_prom_console(void)
-{
-       if (promcons_output) {
-               unregister_console(&promcons);
-               promcons_output = 0;
-       }
+       prom_printf( s);
 }
 }
-
-void disable_early_printk(void)
-       __attribute__((alias("unregister_prom_console")));
index b5937c4ba7db18827ca2ef967ed09baf3356fd73..6e0ecfed964045d7356d29f6a5323263a0d21e03 100644 (file)
@@ -24,11 +24,6 @@ static void prom_console_write(struct console *co, const char *s,
        }
 }
 
        }
 }
 
-int prom_getchar(void)
-{
-       return 0;
-}
-
 static struct console sercons = {
     .name      = "ttyS",
     .write     = prom_console_write,
 static struct console sercons = {
     .name      = "ttyS",
     .write     = prom_console_write,
index a3dad394acb79064ada30bdb122c7e3299eea021..49246264cc7c66a0386bb44733dbc79396006b1e 100644 (file)
@@ -65,5 +65,6 @@ obj-$(CONFIG_64BIT)           += cpu-bugs64.o
 obj-$(CONFIG_I8253)            += i8253.o
 
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o
 obj-$(CONFIG_I8253)            += i8253.o
 
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o
+obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 
 CFLAGS_cpu-bugs64.o    = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
 
 CFLAGS_cpu-bugs64.o    = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
diff --git a/arch/mips/kernel/early_printk.c b/arch/mips/kernel/early_printk.c
new file mode 100644 (file)
index 0000000..304efdc
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2002, 2003, 06, 07 Ralf Baechle (ralf@linux-mips.org)
+ * Copyright (C) 2007 MIPS Technologies, Inc.
+ *   written by Ralf Baechle (ralf@linux-mips.org)
+ */
+#include <linux/console.h>
+#include <linux/init.h>
+
+extern void prom_putchar(char);
+
+static void early_console_write(struct console *con, const char *s, unsigned n)
+{
+       while (n-- && *s) {
+               if (*s == '\n')
+                       prom_putchar('\r');
+               prom_putchar(*s);
+               s++;
+       }
+}
+
+static struct console early_console = {
+       .name   = "early",
+       .write  = early_console_write,
+       .flags  = CON_PRINTBUFFER | CON_BOOT,
+       .index  = -1
+};
+
+void __init setup_early_printk(void)
+{
+       register_console(&early_console);
+}
+
+void __init disable_early_printk(void)
+{
+       unregister_console(&early_console);
+}
index 11ab222a2e972226ab406d3aefa2093804f05311..4975da0bfb634cdf52ebffbfe2bffe68da61ace0 100644 (file)
@@ -525,6 +525,14 @@ void __init setup_arch(char **cmdline_p)
 {
        cpu_probe();
        prom_init();
 {
        cpu_probe();
        prom_init();
+
+#ifdef CONFIG_EARLY_PRINTK
+       {
+               extern void setup_early_printk(void);
+
+               setup_early_printk();
+       }
+#endif
        cpu_report();
 
 #if defined(CONFIG_VT)
        cpu_report();
 
 #if defined(CONFIG_VT)
index d425120b0282f28e54c96f6c15444dcb20c689a6..fbe9a87bd0ade6686062a99c68bbd461de59b059 100644 (file)
@@ -110,12 +110,13 @@ int lasat_init_board_info(void)
                    sizeof(struct lasat_eeprom_struct) - 4);
 
        if (crc != lasat_board_info.li_eeprom_info.crc32) {
                    sizeof(struct lasat_eeprom_struct) - 4);
 
        if (crc != lasat_board_info.li_eeprom_info.crc32) {
-               prom_printf("WARNING...\nWARNING...\nEEPROM CRC does not match calculated, attempting to soldier on...\n");
+               printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM CRC does "
+                      "not match calculated, attempting to soldier on...\n");
        }
 
        }
 
-       if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION)
-       {
-               prom_printf("WARNING...\nWARNING...\nEEPROM version %d, wanted version %d, attempting to soldier on...\n",
+       if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION) {
+               printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM version "
+                      "%d, wanted version %d, attempting to soldier on...\n",
                       (unsigned int)lasat_board_info.li_eeprom_info.version,
                       LASAT_EEPROM_VERSION);
        }
                       (unsigned int)lasat_board_info.li_eeprom_info.version,
                       LASAT_EEPROM_VERSION);
        }
@@ -124,7 +125,9 @@ int lasat_init_board_info(void)
        cfg1 = lasat_board_info.li_eeprom_info.cfg[1];
 
        if ( LASAT_W0_DSCTYPE(cfg0) != 1) {
        cfg1 = lasat_board_info.li_eeprom_info.cfg[1];
 
        if ( LASAT_W0_DSCTYPE(cfg0) != 1) {
-               prom_printf("WARNING...\nWARNING...\nInvalid configuration read from EEPROM, attempting to soldier on...");
+               printk(KERN_WARNING "WARNING...\nWARNING...\n"
+                      "Invalid configuration read from EEPROM, attempting to "
+                      "soldier on...");
        }
        /* We have a valid configuration */
 
        }
        /* We have a valid configuration */
 
index d47692f73a26ee0f619428526eb45535f631ab3e..812c6ac366bea2571933732fc86f5035197b6e28 100644 (file)
 #define PROM_PUTC_ADDR         PROM_JUMP_TABLE_ENTRY(1)
 #define PROM_MONITOR_ADDR      PROM_JUMP_TABLE_ENTRY(2)
 
 #define PROM_PUTC_ADDR         PROM_JUMP_TABLE_ENTRY(1)
 #define PROM_MONITOR_ADDR      PROM_JUMP_TABLE_ENTRY(2)
 
-static void null_prom_printf(const char * fmt, ...)
-{
-}
-
 static void null_prom_display(const char *string, int pos, int clear)
 {
 }
 static void null_prom_display(const char *string, int pos, int clear)
 {
 }
@@ -40,50 +36,29 @@ static void null_prom_putc(char c)
 }
 
 /* these are functions provided by the bootloader */
 }
 
 /* these are functions provided by the bootloader */
-static void (* prom_putc)(char c) = null_prom_putc;
-void (* prom_printf)(const char * fmt, ...) = null_prom_printf;
+static void (* __prom_putc)(char c) = null_prom_putc;
+
+void prom_putchar(char c)
+{
+       __prom_putc(c);
+}
+
 void (* prom_display)(const char *string, int pos, int clear) =
                null_prom_display;
 void (* prom_monitor)(void) = null_prom_monitor;
 
 unsigned int lasat_ndelay_divider;
 
 void (* prom_display)(const char *string, int pos, int clear) =
                null_prom_display;
 void (* prom_monitor)(void) = null_prom_monitor;
 
 unsigned int lasat_ndelay_divider;
 
-#define PROM_PRINTFBUF_SIZE 256
-static char prom_printfbuf[PROM_PRINTFBUF_SIZE];
-
-static void real_prom_printf(const char * fmt, ...)
-{
-       va_list ap;
-       int len;
-       char *c = prom_printfbuf;
-       int i;
-
-       va_start(ap, fmt);
-       len = vsnprintf(prom_printfbuf, PROM_PRINTFBUF_SIZE, fmt, ap);
-       va_end(ap);
-
-       /* output overflowed the buffer */
-       if (len < 0 || len > PROM_PRINTFBUF_SIZE)
-               len = PROM_PRINTFBUF_SIZE;
-
-       for (i=0; i < len; i++) {
-               if (*c == '\n')
-                       prom_putc('\r');
-               prom_putc(*c++);
-       }
-}
-
 static void setup_prom_vectors(void)
 {
        u32 version = *(u32 *)(RESET_VECTOR + 0x90);
 
        if (version >= 307) {
                prom_display = (void *)PROM_DISPLAY_ADDR;
 static void setup_prom_vectors(void)
 {
        u32 version = *(u32 *)(RESET_VECTOR + 0x90);
 
        if (version >= 307) {
                prom_display = (void *)PROM_DISPLAY_ADDR;
-               prom_putc = (void *)PROM_PUTC_ADDR;
-               prom_printf = real_prom_printf;
+               __prom_putc = (void *)PROM_PUTC_ADDR;
                prom_monitor = (void *)PROM_MONITOR_ADDR;
        }
                prom_monitor = (void *)PROM_MONITOR_ADDR;
        }
-       prom_printf("prom vectors set up\n");
+       printk("prom vectors set up\n");
 }
 
 static struct at93c_defs at93c_defs[N_MACHTYPES] = {
 }
 
 static struct at93c_defs at93c_defs[N_MACHTYPES] = {
@@ -101,11 +76,11 @@ void __init prom_init(void)
        setup_prom_vectors();
 
        if (current_cpu_data.cputype == CPU_R5000) {
        setup_prom_vectors();
 
        if (current_cpu_data.cputype == CPU_R5000) {
-               prom_printf("LASAT 200 board\n");
+               printk("LASAT 200 board\n");
                mips_machtype = MACH_LASAT_200;
                 lasat_ndelay_divider = LASAT_200_DIVIDER;
         } else {
                mips_machtype = MACH_LASAT_200;
                 lasat_ndelay_divider = LASAT_200_DIVIDER;
         } else {
-               prom_printf("LASAT 100 board\n");
+               printk("LASAT 100 board\n");
                mips_machtype = MACH_LASAT_100;
                 lasat_ndelay_divider = LASAT_100_DIVIDER;
         }
                mips_machtype = MACH_LASAT_100;
                 lasat_ndelay_divider = LASAT_100_DIVIDER;
         }
index 07be7bf1e4a3960cd55b76dc8792f7679e4a569b..019d45fbd268e634b6dd19747fc90f34d79ac636 100644 (file)
@@ -2,5 +2,4 @@
 #define PROM_H
 extern void (* prom_display)(const char *string, int pos, int clear);
 extern void (* prom_monitor)(void);
 #define PROM_H
 extern void (* prom_display)(const char *string, int pos, int clear);
 extern void (* prom_monitor)(void);
-extern void (* prom_printf)(const char * fmt, ...);
 #endif
 #endif
index b27b47cd6fb218b9a5d6951c3f6a7910ce82ac8e..488007f13988402a1fb5348cc6f7e1c09e0f784f 100644 (file)
@@ -178,5 +178,5 @@ void __init plat_mem_setup(void)
        /* Switch from prom exception handler to normal mode */
        change_c0_status(ST0_BEV,0);
 
        /* Switch from prom exception handler to normal mode */
        change_c0_status(ST0_BEV,0);
 
-       prom_printf("Lasat specific initialization complete\n");
+       pr_info("Lasat specific initialization complete\n");
 }
 }
index 52e0ec8bcb15a3738721255836f5fcaa5d872c9d..d7d3b14dcfb2ba0bd3043e98253ed0aeac4cf5f1 100644 (file)
@@ -2,8 +2,8 @@
 # Makefile for MIPS-specific library files..
 #
 
 # Makefile for MIPS-specific library files..
 #
 
-lib-y  += csum_partial.o memcpy.o memcpy-inatomic.o memset.o promlib.o \
-          strlen_user.o strncpy_user.o strnlen_user.o uncached.o
+lib-y  += csum_partial.o memcpy.o memcpy-inatomic.o memset.o strlen_user.o \
+          strncpy_user.o strnlen_user.o uncached.o
 
 obj-y                  += iomap.o
 obj-$(CONFIG_PCI)      += iomap-pci.o
 
 obj-y                  += iomap.o
 obj-$(CONFIG_PCI)      += iomap-pci.o
diff --git a/arch/mips/lib/promlib.c b/arch/mips/lib/promlib.c
deleted file mode 100644 (file)
index dddfe98..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdarg.h>
-#include <linux/kernel.h>
-
-extern void prom_putchar(char);
-
-void prom_printf(char *fmt, ...)
-{
-       va_list args;
-       char ppbuf[1024];
-       char *bptr;
-
-       va_start(args, fmt);
-       vsprintf(ppbuf, fmt, args);
-
-       bptr = ppbuf;
-
-       while (*bptr != 0) {
-               if (*bptr == '\n')
-                       prom_putchar('\r');
-
-               prom_putchar(*bptr++);
-       }
-       va_end(args);
-}
index 0a30f5dc9b722660ff508fdaa0a674e7826c1bdc..aade36d7878777ef3a2289b844b718818a8c9b5a 100644 (file)
@@ -18,7 +18,9 @@
 # Makefile for the MIPS boards generic routines under Linux.
 #
 
 # Makefile for the MIPS boards generic routines under Linux.
 #
 
-obj-y                          := reset.o display.o init.o memory.o printf.o \
+obj-y                          := reset.o display.o init.o memory.o \
                                   cmdline.o time.o
                                   cmdline.o time.o
+
+obj-$(CONFIG_EARLY_PRINTK)     += console.o
 obj-$(CONFIG_PCI)              += pci.o
 obj-$(CONFIG_KGDB)             += gdb_hook.o
 obj-$(CONFIG_PCI)              += pci.o
 obj-$(CONFIG_KGDB)             += gdb_hook.o
diff --git a/arch/mips/mips-boards/generic/console.c b/arch/mips/mips-boards/generic/console.c
new file mode 100644 (file)
index 0000000..4d8ab99
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Carsten Langgaard, carstenl@mips.com
+ * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
+ *
+ *  This program is free software; you can distribute it and/or modify it
+ *  under the terms of the GNU General Public License (Version 2) as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ *  for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Putting things on the screen/serial line using YAMONs facilities.
+ */
+#include <linux/console.h>
+#include <linux/init.h>
+#include <linux/serial_reg.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_MIPS_ATLAS
+#include <asm/mips-boards/atlas.h>
+
+#ifdef CONFIG_CPU_LITTLE_ENDIAN
+#define PORT(offset) (ATLAS_UART_REGS_BASE     + ((offset)<<3))
+#else
+#define PORT(offset) (ATLAS_UART_REGS_BASE + 3 + ((offset)<<3))
+#endif
+
+#elif defined(CONFIG_MIPS_SEAD)
+
+#include <asm/mips-boards/sead.h>
+
+#ifdef CONFIG_CPU_LITTLE_ENDIAN
+#define PORT(offset) (SEAD_UART0_REGS_BASE     + ((offset)<<3))
+#else
+#define PORT(offset) (SEAD_UART0_REGS_BASE + 3 + ((offset)<<3))
+#endif
+
+#else
+
+#define PORT(offset) (0x3f8 + (offset))
+
+#endif
+
+static inline unsigned int serial_in(int offset)
+{
+       return inb(PORT(offset));
+}
+
+static inline void serial_out(int offset, int value)
+{
+       outb(value, PORT(offset));
+}
+
+int prom_putchar(char c)
+{
+       while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)
+               ;
+
+       serial_out(UART_TX, c);
+
+       return 1;
+}
index 58a0fe883591467333c2624640ab5840e850b0ea..b11337600129b170a75ad0918a89ff72cd5db180 100644 (file)
@@ -167,7 +167,7 @@ static void __init console_config(void)
                        flow = 'r';
                sprintf (console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow);
                strcat (prom_getcmdline(), console_string);
                        flow = 'r';
                sprintf (console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow);
                strcat (prom_getcmdline(), console_string);
-               prom_printf("Config serial console:%s\n", console_string);
+               pr_info("Config serial console:%s\n", console_string);
        }
 }
 #endif
        }
 }
 #endif
@@ -210,8 +210,9 @@ void __init kgdb_config (void)
                        generic_getDebugChar = rs_getDebugChar;
                }
 
                        generic_getDebugChar = rs_getDebugChar;
                }
 
-               prom_printf("KGDB: Using serial line /dev/ttyS%d at %d for session, "
-                           "please connect your debugger\n", line ? 1 : 0, speed);
+               pr_info("KGDB: Using serial line /dev/ttyS%d at %d for "
+                       "session, please connect your debugger\n",
+                       line ? 1 : 0, speed);
 
                {
                        char *s;
 
                {
                        char *s;
@@ -382,7 +383,7 @@ void __init prom_init(void)
        board_nmi_handler_setup = mips_nmi_setup;
        board_ejtag_handler_setup = mips_ejtag_setup;
 
        board_nmi_handler_setup = mips_nmi_setup;
        board_ejtag_handler_setup = mips_ejtag_setup;
 
-       prom_printf("\nLINUX started...\n");
+       pr_info("\nLINUX started...\n");
        prom_init_cmdline();
        prom_meminit();
 #ifdef CONFIG_SERIAL_8250_CONSOLE
        prom_init_cmdline();
        prom_meminit();
 #ifdef CONFIG_SERIAL_8250_CONSOLE
index ebf0e16c5a0de5c36ff4c63016f42a9dbaf95328..ae39953da2c485d3b39d227728aab3f882a7aad8 100644 (file)
@@ -59,11 +59,12 @@ struct prom_pmemblock * __init prom_getmdesc(void)
        /* otherwise look in the environment */
        memsize_str = prom_getenv("memsize");
        if (!memsize_str) {
        /* otherwise look in the environment */
        memsize_str = prom_getenv("memsize");
        if (!memsize_str) {
-               prom_printf("memsize not set in boot prom, set to default (32Mb)\n");
+               printk(KERN_WARNING
+                      "memsize not set in boot prom, set to default (32Mb)\n");
                physical_memsize = 0x02000000;
        } else {
 #ifdef DEBUG
                physical_memsize = 0x02000000;
        } else {
 #ifdef DEBUG
-               prom_printf("prom_memsize = %s\n", memsize_str);
+               pr_debug("prom_memsize = %s\n", memsize_str);
 #endif
                physical_memsize = simple_strtol(memsize_str, NULL, 0);
        }
 #endif
                physical_memsize = simple_strtol(memsize_str, NULL, 0);
        }
@@ -141,12 +142,12 @@ void __init prom_meminit(void)
        struct prom_pmemblock *p;
 
 #ifdef DEBUG
        struct prom_pmemblock *p;
 
 #ifdef DEBUG
-       prom_printf("YAMON MEMORY DESCRIPTOR dump:\n");
+       pr_debug("YAMON MEMORY DESCRIPTOR dump:\n");
        p = prom_getmdesc();
        while (p->size) {
                int i = 0;
        p = prom_getmdesc();
        while (p->size) {
                int i = 0;
-               prom_printf("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n",
-                           i, p, p->base, p->size, mtypes[p->type]);
+               pr_debug("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n",
+                        i, p, p->base, p->size, mtypes[p->type]);
                p++;
                i++;
        }
                p++;
                i++;
        }
diff --git a/arch/mips/mips-boards/generic/printf.c b/arch/mips/mips-boards/generic/printf.c
deleted file mode 100644 (file)
index 1a711bd..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
- *
- *  This program is free software; you can distribute it and/or modify it
- *  under the terms of the GNU General Public License (Version 2) as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- *  for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Putting things on the screen/serial line using YAMONs facilities.
- */
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/serial_reg.h>
-#include <linux/spinlock.h>
-#include <asm/io.h>
-
-#ifdef CONFIG_MIPS_ATLAS
-#include <asm/mips-boards/atlas.h>
-
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
-#define PORT(offset) (ATLAS_UART_REGS_BASE     + ((offset)<<3))
-#else
-#define PORT(offset) (ATLAS_UART_REGS_BASE + 3 + ((offset)<<3))
-#endif
-
-#elif defined(CONFIG_MIPS_SEAD)
-
-#include <asm/mips-boards/sead.h>
-
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
-#define PORT(offset) (SEAD_UART0_REGS_BASE     + ((offset)<<3))
-#else
-#define PORT(offset) (SEAD_UART0_REGS_BASE + 3 + ((offset)<<3))
-#endif
-
-#else
-
-#define PORT(offset) (0x3f8 + (offset))
-
-#endif
-
-static inline unsigned int serial_in(int offset)
-{
-       return inb(PORT(offset));
-}
-
-static inline void serial_out(int offset, int value)
-{
-       outb(value, PORT(offset));
-}
-
-int prom_putchar(char c)
-{
-       while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)
-               ;
-
-       serial_out(UART_TX, c);
-
-       return 1;
-}
-
-char prom_getchar(void)
-{
-       while (!(serial_in(UART_LSR) & UART_LSR_DR))
-               ;
-
-       return serial_in(UART_RX);
-}
-
index a12e32aafde09476bd230a0b37aa679e914201c5..6aeebc9122f25ff96de48b107833a7a324a6de65 100644 (file)
@@ -1,5 +1,7 @@
 #
 # Copyright (C) 2005 MIPS Technologies, Inc.  All rights reserved.
 #
 # Copyright (C) 2005 MIPS Technologies, Inc.  All rights reserved.
+# Copyright (C) 2007 MIPS Technologies, Inc.
+#   written by Ralf Baechle (ralf@linux-mips.org)
 #
 # This program is free software; you can distribute it and/or modify it
 # under the terms of the GNU General Public License (Version 2) as
 #
 # This program is free software; you can distribute it and/or modify it
 # under the terms of the GNU General Public License (Version 2) as
@@ -15,5 +17,7 @@
 # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 #
 
 # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 #
 
-obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_cmdline.o
+obj-y := sim_setup.o sim_mem.o sim_time.o sim_int.o sim_cmdline.o
+
+obj-$(CONFIG_EARLY_PRINTK) += sim_console.o
 obj-$(CONFIG_SMP) += sim_smp.o
 obj-$(CONFIG_SMP) += sim_smp.o
diff --git a/arch/mips/mips-boards/sim/sim_console.c b/arch/mips/mips-boards/sim/sim_console.c
new file mode 100644 (file)
index 0000000..de595a9
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ *  This program is free software; you can distribute it and/or modify it
+ *  under the terms of the GNU General Public License (Version 2) as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ *  for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Carsten Langgaard, carstenl@mips.com
+ * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
+ * Copyright (C) 2007 MIPS Technologies, Inc.
+ *   written by Ralf Baechle
+ */
+#include <linux/init.h>
+#include <linux/serial_reg.h>
+#include <asm/io.h>
+
+static inline unsigned int serial_in(int offset)
+{
+       return inb(0x3f8 + offset);
+}
+
+static inline void serial_out(int offset, int value)
+{
+       outb(value, 0x3f8 + offset);
+}
+
+void __init prom_putchar(char c)
+{
+       while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)
+               ;
+
+       serial_out(UART_TX, c);
+}
index 46bc16f8b15d3fe4d50e3a9ab989a17f3e440114..e408ef0bcd6e4af27f89ce3aba9df885a5b9dcaf 100644 (file)
@@ -46,7 +46,7 @@ struct prom_pmemblock * __init prom_getmdesc(void)
        unsigned int memsize;
 
        memsize = 0x02000000;
        unsigned int memsize;
 
        memsize = 0x02000000;
-       prom_printf("Setting default memory size 0x%08x\n", memsize);
+       pr_info("Setting default memory size 0x%08x\n", memsize);
 
        memset(mdesc, 0, sizeof(mdesc));
 
 
        memset(mdesc, 0, sizeof(mdesc));
 
diff --git a/arch/mips/mips-boards/sim/sim_printf.c b/arch/mips/mips-boards/sim/sim_printf.c
deleted file mode 100644 (file)
index 3ee5a0b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
- *
- *  This program is free software; you can distribute it and/or modify it
- *  under the terms of the GNU General Public License (Version 2) as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- *  for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Putting things on the screen/serial line using YAMONs facilities.
- */
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/serial_reg.h>
-#include <linux/spinlock.h>
-#include <asm/io.h>
-#include <asm/system.h>
-
-static inline unsigned int serial_in(int offset)
-{
-       return inb(0x3f8 + offset);
-}
-
-static inline void serial_out(int offset, int value)
-{
-       outb(value, 0x3f8 + offset);
-}
-
-int putPromChar(char c)
-{
-       while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)
-               ;
-
-       serial_out(UART_TX, c);
-
-       return 1;
-}
-
-char getPromChar(void)
-{
-       while (!(serial_in(UART_LSR) & 1))
-               ;
-
-       return serial_in(UART_RX);
-}
-
-void prom_printf(char *fmt, ...)
-{
-       va_list args;
-       int l;
-       char *p, *buf_end;
-       char buf[1024];
-
-       va_start(args, fmt);
-       l = vsprintf(buf, fmt, args); /* hopefully i < sizeof(buf) */
-       va_end(args);
-
-       buf_end = buf + l;
-
-       for (p = buf; p < buf_end; p++) {
-               /* Crude cr/nl handling is better than none */
-               if (*p == '\n')
-                       putPromChar('\r');
-               putPromChar(*p);
-       }
-}
index ea2066c3a1f77e43ca1c6f0f0af5e38ac8046572..b705f09e57c311a8b6fc64fea54776a1dbd21626 100644 (file)
@@ -55,7 +55,7 @@ void __init plat_mem_setup(void)
        serial_init();
 
        board_time_init = sim_time_init;
        serial_init();
 
        board_time_init = sim_time_init;
-       prom_printf("Linux started...\n");
+       pr_info("Linux started...\n");
 
 #ifdef CONFIG_MIPS_MT_SMP
        sanitize_tlb_entries();
 
 #ifdef CONFIG_MIPS_MT_SMP
        sanitize_tlb_entries();
@@ -66,7 +66,7 @@ void prom_init(void)
 {
        set_io_port_base(0xbfd00000);
 
 {
        set_io_port_base(0xbfd00000);
 
-       prom_printf("\nLINUX started...\n");
+       pr_info("\nLINUX started...\n");
        prom_init_cmdline();
        prom_meminit();
 }
        prom_init_cmdline();
        prom_meminit();
 }
@@ -91,7 +91,7 @@ static void __init serial_init(void)
        s.timeout = 4;
 
        if (early_serial_setup(&s) != 0) {
        s.timeout = 4;
 
        if (early_serial_setup(&s) != 0) {
-               prom_printf(KERN_ERR "Serial setup failed!\n");
+               printk(KERN_ERR "Serial setup failed!\n");
        }
 
 #endif
        }
 
 #endif
index e19fbb9ee47f240e9785cef121e819aacc6f8436..11a916629d3b57859796766d589ac5a1837b2c84 100644 (file)
@@ -77,66 +77,66 @@ static uint32_t     extract_dc(unsigned short addr, int data);
 static inline void breakout_errctl(unsigned int val)
 {
        if (val & CP0_ERRCTL_RECOVERABLE)
 static inline void breakout_errctl(unsigned int val)
 {
        if (val & CP0_ERRCTL_RECOVERABLE)
-               prom_printf(" recoverable");
+               printk(" recoverable");
        if (val & CP0_ERRCTL_DCACHE)
        if (val & CP0_ERRCTL_DCACHE)
-               prom_printf(" dcache");
+               printk(" dcache");
        if (val & CP0_ERRCTL_ICACHE)
        if (val & CP0_ERRCTL_ICACHE)
-               prom_printf(" icache");
+               printk(" icache");
        if (val & CP0_ERRCTL_MULTIBUS)
        if (val & CP0_ERRCTL_MULTIBUS)
-               prom_printf(" multiple-buserr");
-       prom_printf("\n");
+               printk(" multiple-buserr");
+       printk("\n");
 }
 
 static inline void breakout_cerri(unsigned int val)
 {
        if (val & CP0_CERRI_TAG_PARITY)
 }
 
 static inline void breakout_cerri(unsigned int val)
 {
        if (val & CP0_CERRI_TAG_PARITY)
-               prom_printf(" tag-parity");
+               printk(" tag-parity");
        if (val & CP0_CERRI_DATA_PARITY)
        if (val & CP0_CERRI_DATA_PARITY)
-               prom_printf(" data-parity");
+               printk(" data-parity");
        if (val & CP0_CERRI_EXTERNAL)
        if (val & CP0_CERRI_EXTERNAL)
-               prom_printf(" external");
-       prom_printf("\n");
+               printk(" external");
+       printk("\n");
 }
 
 static inline void breakout_cerrd(unsigned int val)
 {
        switch (val & CP0_CERRD_CAUSES) {
        case CP0_CERRD_LOAD:
 }
 
 static inline void breakout_cerrd(unsigned int val)
 {
        switch (val & CP0_CERRD_CAUSES) {
        case CP0_CERRD_LOAD:
-               prom_printf(" load,");
+               printk(" load,");
                break;
        case CP0_CERRD_STORE:
                break;
        case CP0_CERRD_STORE:
-               prom_printf(" store,");
+               printk(" store,");
                break;
        case CP0_CERRD_FILLWB:
                break;
        case CP0_CERRD_FILLWB:
-               prom_printf(" fill/wb,");
+               printk(" fill/wb,");
                break;
        case CP0_CERRD_COHERENCY:
                break;
        case CP0_CERRD_COHERENCY:
-               prom_printf(" coherency,");
+               printk(" coherency,");
                break;
        case CP0_CERRD_DUPTAG:
                break;
        case CP0_CERRD_DUPTAG:
-               prom_printf(" duptags,");
+               printk(" duptags,");
                break;
        default:
                break;
        default:
-               prom_printf(" NO CAUSE,");
+               printk(" NO CAUSE,");
                break;
        }
        if (!(val & CP0_CERRD_TYPES))
                break;
        }
        if (!(val & CP0_CERRD_TYPES))
-               prom_printf(" NO TYPE");
+               printk(" NO TYPE");
        else {
                if (val & CP0_CERRD_MULTIPLE)
        else {
                if (val & CP0_CERRD_MULTIPLE)
-                       prom_printf(" multi-err");
+                       printk(" multi-err");
                if (val & CP0_CERRD_TAG_STATE)
                if (val & CP0_CERRD_TAG_STATE)
-                       prom_printf(" tag-state");
+                       printk(" tag-state");
                if (val & CP0_CERRD_TAG_ADDRESS)
                if (val & CP0_CERRD_TAG_ADDRESS)
-                       prom_printf(" tag-address");
+                       printk(" tag-address");
                if (val & CP0_CERRD_DATA_SBE)
                if (val & CP0_CERRD_DATA_SBE)
-                       prom_printf(" data-SBE");
+                       printk(" data-SBE");
                if (val & CP0_CERRD_DATA_DBE)
                if (val & CP0_CERRD_DATA_DBE)
-                       prom_printf(" data-DBE");
+                       printk(" data-DBE");
                if (val & CP0_CERRD_EXTERNAL)
                if (val & CP0_CERRD_EXTERNAL)
-                       prom_printf(" external");
+                       printk(" external");
        }
        }
-       prom_printf("\n");
+       printk("\n");
 }
 
 #ifndef CONFIG_SIBYTE_BUS_WATCHER
 }
 
 #ifndef CONFIG_SIBYTE_BUS_WATCHER
@@ -157,18 +157,18 @@ static void check_bus_watcher(void)
                l2_tag = in64(IO_SPACE_BASE | A_L2_ECC_TAG);
 #endif
                memio_err = csr_in32(IOADDR(A_BUS_MEM_IO_ERRORS));
                l2_tag = in64(IO_SPACE_BASE | A_L2_ECC_TAG);
 #endif
                memio_err = csr_in32(IOADDR(A_BUS_MEM_IO_ERRORS));
-               prom_printf("Bus watcher error counters: %08x %08x\n", l2_err, memio_err);
-               prom_printf("\nLast recorded signature:\n");
-               prom_printf("Request %02x from %d, answered by %d with Dcode %d\n",
+               printk("Bus watcher error counters: %08x %08x\n", l2_err, memio_err);
+               printk("\nLast recorded signature:\n");
+               printk("Request %02x from %d, answered by %d with Dcode %d\n",
                       (unsigned int)(G_SCD_BERR_TID(status) & 0x3f),
                       (int)(G_SCD_BERR_TID(status) >> 6),
                       (int)G_SCD_BERR_RID(status),
                       (int)G_SCD_BERR_DCODE(status));
 #ifdef DUMP_L2_ECC_TAG_ON_ERROR
                       (unsigned int)(G_SCD_BERR_TID(status) & 0x3f),
                       (int)(G_SCD_BERR_TID(status) >> 6),
                       (int)G_SCD_BERR_RID(status),
                       (int)G_SCD_BERR_DCODE(status));
 #ifdef DUMP_L2_ECC_TAG_ON_ERROR
-               prom_printf("Last L2 tag w/ bad ECC: %016llx\n", l2_tag);
+               printk("Last L2 tag w/ bad ECC: %016llx\n", l2_tag);
 #endif
        } else {
 #endif
        } else {
-               prom_printf("Bus watcher indicates no error\n");
+               printk("Bus watcher indicates no error\n");
        }
 }
 #else
        }
 }
 #else
@@ -187,11 +187,11 @@ asmlinkage void sb1_cache_error(void)
 #else
        csr_out32(M_SCD_TRACE_CFG_FREEZE, IO_SPACE_BASE | A_SCD_TRACE_CFG);
 #endif
 #else
        csr_out32(M_SCD_TRACE_CFG_FREEZE, IO_SPACE_BASE | A_SCD_TRACE_CFG);
 #endif
-       prom_printf("Trace buffer frozen\n");
+       printk("Trace buffer frozen\n");
 #endif
 
 #endif
 
-       prom_printf("Cache error exception on CPU %x:\n",
-                   (read_c0_prid() >> 25) & 0x7);
+       printk("Cache error exception on CPU %x:\n",
+              (read_c0_prid() >> 25) & 0x7);
 
        __asm__ __volatile__ (
        "       .set    push\n\t"
 
        __asm__ __volatile__ (
        "       .set    push\n\t"
@@ -209,43 +209,43 @@ asmlinkage void sb1_cache_error(void)
          "=r" (dpahi), "=r" (dpalo), "=r" (eepc));
 
        cerr_dpa = (((uint64_t)dpahi) << 32) | dpalo;
          "=r" (dpahi), "=r" (dpalo), "=r" (eepc));
 
        cerr_dpa = (((uint64_t)dpahi) << 32) | dpalo;
-       prom_printf(" c0_errorepc ==   %08x\n", eepc);
-       prom_printf(" c0_errctl   ==   %08x", errctl);
+       printk(" c0_errorepc ==   %08x\n", eepc);
+       printk(" c0_errctl   ==   %08x", errctl);
        breakout_errctl(errctl);
        if (errctl & CP0_ERRCTL_ICACHE) {
        breakout_errctl(errctl);
        if (errctl & CP0_ERRCTL_ICACHE) {
-               prom_printf(" c0_cerr_i   ==   %08x", cerr_i);
+               printk(" c0_cerr_i   ==   %08x", cerr_i);
                breakout_cerri(cerr_i);
                if (CP0_CERRI_IDX_VALID(cerr_i)) {
                        /* Check index of EPC, allowing for delay slot */
                        if (((eepc & SB1_CACHE_INDEX_MASK) != (cerr_i & SB1_CACHE_INDEX_MASK)) &&
                            ((eepc & SB1_CACHE_INDEX_MASK) != ((cerr_i & SB1_CACHE_INDEX_MASK) - 4)))
                breakout_cerri(cerr_i);
                if (CP0_CERRI_IDX_VALID(cerr_i)) {
                        /* Check index of EPC, allowing for delay slot */
                        if (((eepc & SB1_CACHE_INDEX_MASK) != (cerr_i & SB1_CACHE_INDEX_MASK)) &&
                            ((eepc & SB1_CACHE_INDEX_MASK) != ((cerr_i & SB1_CACHE_INDEX_MASK) - 4)))
-                               prom_printf(" cerr_i idx doesn't match eepc\n");
+                               printk(" cerr_i idx doesn't match eepc\n");
                        else {
                                res = extract_ic(cerr_i & SB1_CACHE_INDEX_MASK,
                                                 (cerr_i & CP0_CERRI_DATA) != 0);
                                if (!(res & cerr_i))
                        else {
                                res = extract_ic(cerr_i & SB1_CACHE_INDEX_MASK,
                                                 (cerr_i & CP0_CERRI_DATA) != 0);
                                if (!(res & cerr_i))
-                                       prom_printf("...didn't see indicated icache problem\n");
+                                       printk("...didn't see indicated icache problem\n");
                        }
                }
        }
        if (errctl & CP0_ERRCTL_DCACHE) {
                        }
                }
        }
        if (errctl & CP0_ERRCTL_DCACHE) {
-               prom_printf(" c0_cerr_d   ==   %08x", cerr_d);
+               printk(" c0_cerr_d   ==   %08x", cerr_d);
                breakout_cerrd(cerr_d);
                if (CP0_CERRD_DPA_VALID(cerr_d)) {
                breakout_cerrd(cerr_d);
                if (CP0_CERRD_DPA_VALID(cerr_d)) {
-                       prom_printf(" c0_cerr_dpa == %010llx\n", cerr_dpa);
+                       printk(" c0_cerr_dpa == %010llx\n", cerr_dpa);
                        if (!CP0_CERRD_IDX_VALID(cerr_d)) {
                                res = extract_dc(cerr_dpa & SB1_CACHE_INDEX_MASK,
                                                 (cerr_d & CP0_CERRD_DATA) != 0);
                                if (!(res & cerr_d))
                        if (!CP0_CERRD_IDX_VALID(cerr_d)) {
                                res = extract_dc(cerr_dpa & SB1_CACHE_INDEX_MASK,
                                                 (cerr_d & CP0_CERRD_DATA) != 0);
                                if (!(res & cerr_d))
-                                       prom_printf("...didn't see indicated dcache problem\n");
+                                       printk("...didn't see indicated dcache problem\n");
                        } else {
                                if ((cerr_dpa & SB1_CACHE_INDEX_MASK) != (cerr_d & SB1_CACHE_INDEX_MASK))
                        } else {
                                if ((cerr_dpa & SB1_CACHE_INDEX_MASK) != (cerr_d & SB1_CACHE_INDEX_MASK))
-                                       prom_printf(" cerr_d idx doesn't match cerr_dpa\n");
+                                       printk(" cerr_d idx doesn't match cerr_dpa\n");
                                else {
                                        res = extract_dc(cerr_d & SB1_CACHE_INDEX_MASK,
                                                         (cerr_d & CP0_CERRD_DATA) != 0);
                                        if (!(res & cerr_d))
                                else {
                                        res = extract_dc(cerr_d & SB1_CACHE_INDEX_MASK,
                                                         (cerr_d & CP0_CERRD_DATA) != 0);
                                        if (!(res & cerr_d))
-                                               prom_printf("...didn't see indicated problem\n");
+                                               printk("...didn't see indicated problem\n");
                                }
                        }
                }
                                }
                        }
                }
@@ -334,7 +334,7 @@ static uint32_t extract_ic(unsigned short addr, int data)
        uint8_t lru;
        int res = 0;
 
        uint8_t lru;
        int res = 0;
 
-       prom_printf("Icache index 0x%04x  ", addr);
+       printk("Icache index 0x%04x  ", addr);
        for (way = 0; way < 4; way++) {
                /* Index-load-tag-I */
                __asm__ __volatile__ (
        for (way = 0; way < 4; way++) {
                /* Index-load-tag-I */
                __asm__ __volatile__ (
@@ -354,7 +354,7 @@ static uint32_t extract_ic(unsigned short addr, int data)
                taglo = ((unsigned long long)taglohi << 32) | taglolo;
                if (way == 0) {
                        lru = (taghi >> 14) & 0xff;
                taglo = ((unsigned long long)taglohi << 32) | taglolo;
                if (way == 0) {
                        lru = (taghi >> 14) & 0xff;
-                       prom_printf("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
+                       printk("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
                                    ((addr >> 5) & 0x3), /* bank */
                                    ((addr >> 7) & 0x3f), /* index */
                                    (lru & 0x3),
                                    ((addr >> 5) & 0x3), /* bank */
                                    ((addr >> 7) & 0x3f), /* index */
                                    (lru & 0x3),
@@ -369,19 +369,19 @@ static uint32_t extract_ic(unsigned short addr, int data)
                if (valid) {
                        tlo_tmp = taglo & 0xfff3ff;
                        if (((taglo >> 10) & 1) ^ range_parity(tlo_tmp, 23, 0)) {
                if (valid) {
                        tlo_tmp = taglo & 0xfff3ff;
                        if (((taglo >> 10) & 1) ^ range_parity(tlo_tmp, 23, 0)) {
-                               prom_printf("   ** bad parity in VTag0/G/ASID\n");
+                               printk("   ** bad parity in VTag0/G/ASID\n");
                                res |= CP0_CERRI_TAG_PARITY;
                        }
                        if (((taglo >> 11) & 1) ^ range_parity(taglo, 63, 24)) {
                                res |= CP0_CERRI_TAG_PARITY;
                        }
                        if (((taglo >> 11) & 1) ^ range_parity(taglo, 63, 24)) {
-                               prom_printf("   ** bad parity in R/VTag1\n");
+                               printk("   ** bad parity in R/VTag1\n");
                                res |= CP0_CERRI_TAG_PARITY;
                        }
                }
                if (valid ^ ((taghi >> 27) & 1)) {
                                res |= CP0_CERRI_TAG_PARITY;
                        }
                }
                if (valid ^ ((taghi >> 27) & 1)) {
-                       prom_printf("   ** bad parity for valid bit\n");
+                       printk("   ** bad parity for valid bit\n");
                        res |= CP0_CERRI_TAG_PARITY;
                }
                        res |= CP0_CERRI_TAG_PARITY;
                }
-               prom_printf(" %d  [VA %016llx]  [Vld? %d]  raw tags: %08X-%016llX\n",
+               printk(" %d  [VA %016llx]  [Vld? %d]  raw tags: %08X-%016llX\n",
                            way, va, valid, taghi, taglo);
 
                if (data) {
                            way, va, valid, taghi, taglo);
 
                if (data) {
@@ -407,21 +407,21 @@ static uint32_t extract_ic(unsigned short addr, int data)
                                : "r" ((way << 13) | addr | (offset << 3)));
                                predecode = (datahi >> 8) & 0xff;
                                if (((datahi >> 16) & 1) != (uint32_t)range_parity(predecode, 7, 0)) {
                                : "r" ((way << 13) | addr | (offset << 3)));
                                predecode = (datahi >> 8) & 0xff;
                                if (((datahi >> 16) & 1) != (uint32_t)range_parity(predecode, 7, 0)) {
-                                       prom_printf("   ** bad parity in predecode\n");
+                                       printk("   ** bad parity in predecode\n");
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
                                /* XXXKW should/could check predecode bits themselves */
                                if (((datahi >> 4) & 0xf) ^ inst_parity(insta)) {
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
                                /* XXXKW should/could check predecode bits themselves */
                                if (((datahi >> 4) & 0xf) ^ inst_parity(insta)) {
-                                       prom_printf("   ** bad parity in instruction a\n");
+                                       printk("   ** bad parity in instruction a\n");
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
                                if ((datahi & 0xf) ^ inst_parity(instb)) {
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
                                if ((datahi & 0xf) ^ inst_parity(instb)) {
-                                       prom_printf("   ** bad parity in instruction b\n");
+                                       printk("   ** bad parity in instruction b\n");
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
-                               prom_printf("  %05X-%08X%08X", datahi, insta, instb);
+                               printk("  %05X-%08X%08X", datahi, insta, instb);
                        }
                        }
-                       prom_printf("\n");
+                       printk("\n");
                }
        }
        return res;
                }
        }
        return res;
@@ -489,7 +489,7 @@ static uint32_t extract_dc(unsigned short addr, int data)
        uint8_t ecc, lru;
        int res = 0;
 
        uint8_t ecc, lru;
        int res = 0;
 
-       prom_printf("Dcache index 0x%04x  ", addr);
+       printk("Dcache index 0x%04x  ", addr);
        for (way = 0; way < 4; way++) {
                __asm__ __volatile__ (
                "       .set    push\n\t"
        for (way = 0; way < 4; way++) {
                __asm__ __volatile__ (
                "       .set    push\n\t"
@@ -509,7 +509,7 @@ static uint32_t extract_dc(unsigned short addr, int data)
                pa = (taglo & 0xFFFFFFE000ULL) | addr;
                if (way == 0) {
                        lru = (taghi >> 14) & 0xff;
                pa = (taglo & 0xFFFFFFE000ULL) | addr;
                if (way == 0) {
                        lru = (taghi >> 14) & 0xff;
-                       prom_printf("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
+                       printk("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
                                    ((addr >> 11) & 0x2) | ((addr >> 5) & 1), /* bank */
                                    ((addr >> 6) & 0x3f), /* index */
                                    (lru & 0x3),
                                    ((addr >> 11) & 0x2) | ((addr >> 5) & 1), /* bank */
                                    ((addr >> 6) & 0x3f), /* index */
                                    (lru & 0x3),
@@ -519,15 +519,15 @@ static uint32_t extract_dc(unsigned short addr, int data)
                }
                state = (taghi >> 25) & 0x1f;
                valid = DC_TAG_VALID(state);
                }
                state = (taghi >> 25) & 0x1f;
                valid = DC_TAG_VALID(state);
-               prom_printf(" %d  [PA %010llx]  [state %s (%02x)]  raw tags: %08X-%016llX\n",
+               printk(" %d  [PA %010llx]  [state %s (%02x)]  raw tags: %08X-%016llX\n",
                            way, pa, dc_state_str(state), state, taghi, taglo);
                if (valid) {
                        if (((taglo >> 11) & 1) ^ range_parity(taglo, 39, 26)) {
                            way, pa, dc_state_str(state), state, taghi, taglo);
                if (valid) {
                        if (((taglo >> 11) & 1) ^ range_parity(taglo, 39, 26)) {
-                               prom_printf("   ** bad parity in PTag1\n");
+                               printk("   ** bad parity in PTag1\n");
                                res |= CP0_CERRD_TAG_ADDRESS;
                        }
                        if (((taglo >> 10) & 1) ^ range_parity(taglo, 25, 13)) {
                                res |= CP0_CERRD_TAG_ADDRESS;
                        }
                        if (((taglo >> 10) & 1) ^ range_parity(taglo, 25, 13)) {
-                               prom_printf("   ** bad parity in PTag0\n");
+                               printk("   ** bad parity in PTag0\n");
                                res |= CP0_CERRD_TAG_ADDRESS;
                        }
                } else {
                                res |= CP0_CERRD_TAG_ADDRESS;
                        }
                } else {
@@ -567,13 +567,13 @@ static uint32_t extract_dc(unsigned short addr, int data)
                                        }
                                        res |= (bits == 1) ? CP0_CERRD_DATA_SBE : CP0_CERRD_DATA_DBE;
                                }
                                        }
                                        res |= (bits == 1) ? CP0_CERRD_DATA_SBE : CP0_CERRD_DATA_DBE;
                                }
-                               prom_printf("  %02X-%016llX", datahi, datalo);
+                               printk("  %02X-%016llX", datahi, datalo);
                        }
                        }
-                       prom_printf("\n");
+                       printk("\n");
                        if (bad_ecc)
                        if (bad_ecc)
-                               prom_printf("  dwords w/ bad ECC: %d %d %d %d\n",
-                                           !!(bad_ecc & 8), !!(bad_ecc & 4),
-                                           !!(bad_ecc & 2), !!(bad_ecc & 1));
+                               printk("  dwords w/ bad ECC: %d %d %d %d\n",
+                                      !!(bad_ecc & 8), !!(bad_ecc & 4),
+                                      !!(bad_ecc & 2), !!(bad_ecc & 1));
                }
        }
        return res;
                }
        }
        return res;
index 2292d0ec47fc27aadfe255499214293f81ea5622..2c30b4f562456ef12c68b277adfccaa8da98dfb6 100644 (file)
@@ -74,11 +74,6 @@ void prom_putchar(char c)
        uart->iu_thr = c;
 }
 
        uart->iu_thr = c;
 }
 
-char __init prom_getchar(void)
-{
-       return 0;
-}
-
 static void inline ja_console_probe(void)
 {
        struct uart_port up;
 static void inline ja_console_probe(void)
 {
        struct uart_port up;
index 8aeed6c2b8c36417b0ce84c9bf2420df6a5b7430..2f567452e7acd890b4609bc7e166ab4bc98e743e 100644 (file)
@@ -112,7 +112,7 @@ void __init prom_free_prom_memory(void)
 
 extern int pnx8550_console_port;
 
 
 extern int pnx8550_console_port;
 
-/* used by prom_printf */
+/* used by early printk */
 void prom_putchar(char c)
 {
        if (pnx8550_console_port != -1) {
 void prom_putchar(char c)
 {
        if (pnx8550_console_port != -1) {
index e62123ca9b64899c51176a2c6ad6ae95381f5882..5bd737477685840410f3e73b400f75495f8990b2 100644 (file)
@@ -41,8 +41,6 @@
 #include <uart.h>
 #include <nand.h>
 
 #include <uart.h>
 #include <nand.h>
 
-extern void prom_printf(char *fmt, ...);
-
 extern void __init board_setup(void);
 extern void pnx8550_machine_restart(char *);
 extern void pnx8550_machine_halt(void);
 extern void __init board_setup(void);
 extern void pnx8550_machine_restart(char *);
 extern void pnx8550_machine_halt(void);
@@ -51,7 +49,6 @@ extern struct resource ioport_resource;
 extern struct resource iomem_resource;
 extern void pnx8550_time_init(void);
 extern void rs_kgdb_hook(int tty_no);
 extern struct resource iomem_resource;
 extern void pnx8550_time_init(void);
 extern void rs_kgdb_hook(int tty_no);
-extern void prom_printf(char *fmt, ...);
 extern char *prom_getcmdline(void);
 
 struct resource standard_io_resources[] = {
 extern char *prom_getcmdline(void);
 
 struct resource standard_io_resources[] = {
@@ -141,7 +138,7 @@ void __init plat_mem_setup(void)
                argptr += strlen("console=ttyS");
                pnx8550_console_port = *argptr == '0' ? 0 : 1;
 
                argptr += strlen("console=ttyS");
                pnx8550_console_port = *argptr == '0' ? 0 : 1;
 
-               /* We must initialize the UART (console) before prom_printf */
+               /* We must initialize the UART (console) before early printk */
                /* Set LCR to 8-bit and BAUD to 38400 (no 5)                */
                ip3106_lcr(UART_BASE, pnx8550_console_port) =
                        PNX8XXX_UART_LCR_8BIT;
                /* Set LCR to 8-bit and BAUD to 38400 (no 5)                */
                ip3106_lcr(UART_BASE, pnx8550_console_port) =
                        PNX8XXX_UART_LCR_8BIT;
@@ -155,8 +152,8 @@ void __init plat_mem_setup(void)
                argptr += strlen("kgdb=ttyS");
                line = *argptr == '0' ? 0 : 1;
                rs_kgdb_hook(line);
                argptr += strlen("kgdb=ttyS");
                line = *argptr == '0' ? 0 : 1;
                rs_kgdb_hook(line);
-               prom_printf("KGDB: Using ttyS%i for session, "
-                               "please connect your debugger\n", line ? 1 : 0);
+               pr_info("KGDB: Using ttyS%i for session, "
+                       "please connect your debugger\n", line ? 1 : 0);
        }
 #endif
        return;
        }
 #endif
        return;
index 757e605693ff7bbac17ace1d032dbf19107aaf86..b7f1d9c4a8a3c7d588b270d6bd6e1bad0590f6b2 100644 (file)
@@ -107,8 +107,3 @@ void prom_putchar(char c)
        while ((readb_outer_space(lsr) & 0x20) == 0);
        writeb_outer_space(thr, c);
 }
        while ((readb_outer_space(lsr) & 0x20) == 0);
        writeb_outer_space(thr, c);
 }
-
-char __init prom_getchar(void)
-{
-       return 0;
-}
index 14211e382374609ac4166bb3900fde69bc3368cc..3ba830651c58f93d317212a04b784b00d6a17155 100644 (file)
@@ -6,12 +6,6 @@
  * Copyright (C) 2001, 2002 Ralf Baechle
  */
 #include <linux/init.h>
  * Copyright (C) 2001, 2002 Ralf Baechle
  */
 #include <linux/init.h>
-#include <linux/console.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/termios.h>
-#include <linux/sched.h>
-#include <linux/tty.h>
 
 #include <asm/page.h>
 #include <asm/semaphore.h>
 
 #include <asm/page.h>
 #include <asm/semaphore.h>
@@ -38,37 +32,10 @@ static inline struct ioc3_uartregs *console_uart(void)
        return &ioc3->sregs.uarta;
 }
 
        return &ioc3->sregs.uarta;
 }
 
-void prom_putchar(char c)
+void __init prom_putchar(char c)
 {
        struct ioc3_uartregs *uart = console_uart();
 
        while ((uart->iu_lsr & 0x20) == 0);
        uart->iu_thr = c;
 }
 {
        struct ioc3_uartregs *uart = console_uart();
 
        while ((uart->iu_lsr & 0x20) == 0);
        uart->iu_thr = c;
 }
-
-static void ioc3_console_write(struct console *con, const char *s, unsigned n)
-{
-       while (n-- && *s) {
-               if (*s == '\n')
-                       prom_putchar('\r');
-               prom_putchar(*s);
-               s++;
-       }
-}
-
-static struct console ioc3_console = {
-       .name   = "ioc3",
-       .write  = ioc3_console_write,
-       .flags  = CON_PRINTBUFFER | CON_BOOT,
-       .index  = -1
-};
-
-__init void ip27_setup_console(void)
-{
-       register_console(&ioc3_console);
-}
-
-void __init disable_early_printk(void)
-{
-       unregister_console(&ioc3_console);
-}
index ec7a2cffacf01430485da171a33142ee9de5f1f6..67dac6204b6da32cc9d76880ab5874716c80cd8d 100644 (file)
@@ -116,6 +116,7 @@ config SB1_CERR_STALL
 config SIBYTE_CFE
        bool "Booting from CFE"
        depends on SIBYTE_SB1xxx_SOC
 config SIBYTE_CFE
        bool "Booting from CFE"
        depends on SIBYTE_SB1xxx_SOC
+       select SYS_HAS_EARLY_PRINTK
        help
          Make use of the CFE API for enumerating available memory,
          controlling secondary CPUs, and possibly console output.
        help
          Make use of the CFE API for enumerating available memory,
          controlling secondary CPUs, and possibly console output.
@@ -131,6 +132,7 @@ config SIBYTE_CFE_CONSOLE
 config SIBYTE_STANDALONE
        bool
        depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
 config SIBYTE_STANDALONE
        bool
        depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
+       select SYS_HAS_EARLY_PRINTK
        default y
 
 config SIBYTE_STANDALONE_RAM_SIZE
        default y
 
 config SIBYTE_STANDALONE_RAM_SIZE
index 1dc5d05d8962067fc9ef206ee019b2da90c0e6f5..20af0f1bb7bf9b8af97d0e486b67cc76892c8d0d 100644 (file)
@@ -420,7 +420,7 @@ void __init arch_init_irq(void)
 #ifdef CONFIG_GDB_CONSOLE
                register_gdb_console();
 #endif
 #ifdef CONFIG_GDB_CONSOLE
                register_gdb_console();
 #endif
-               prom_printf("Waiting for GDB on UART port %d\n", kgdb_port);
+               printk("Waiting for GDB on UART port %d\n", kgdb_port);
                set_debug_traps();
                breakpoint();
        }
                set_debug_traps();
                breakpoint();
        }
index 8236d0c48542cc7dbaedd672588e13f46e513283..bdaac34ae70897dc796e343d8bfe0b4346879311 100644 (file)
@@ -69,7 +69,7 @@ static inline int sys_rev_decode(void)
                break;
 
            default:
                break;
 
            default:
-               prom_printf("Unknown part type %x\n", part_type);
+               printk("Unknown part type %x\n", part_type);
                ret = 1;
                break;
        }
                ret = 1;
                break;
        }
@@ -102,7 +102,7 @@ static inline int setup_bcm1x80_bcm1x55(void)
                pass_str = "B0 (pass2)";
                break;
            default:
                pass_str = "B0 (pass2)";
                break;
            default:
-               prom_printf("Unknown %s rev %x\n", soc_str, soc_pass);
+               printk("Unknown %s rev %x\n", soc_str, soc_pass);
                periph_rev = 1;
                pass_str = "Unknown Revision";
                break;
                periph_rev = 1;
                pass_str = "Unknown Revision";
                break;
@@ -122,14 +122,14 @@ void bcm1480_setup(void)
        soc_pass = G_SYS_REVISION(sys_rev);
 
        if (sys_rev_decode()) {
        soc_pass = G_SYS_REVISION(sys_rev);
 
        if (sys_rev_decode()) {
-               prom_printf("Restart after failure to identify SiByte chip\n");
+               printk("Restart after failure to identify SiByte chip\n");
                machine_restart(NULL);
        }
 
        plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
        zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25);
 
                machine_restart(NULL);
        }
 
        plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
        zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25);
 
-       prom_printf("Broadcom SiByte %s %s @ %d MHz (SB-1A rev %d)\n",
+       printk("Broadcom SiByte %s %s @ %d MHz (SB-1A rev %d)\n",
                    soc_str, pass_str, zbbus_mhz * 2, sb1_pass);
                    soc_str, pass_str, zbbus_mhz * 2, sb1_pass);
-       prom_printf("Board type: %s\n", get_system_type());
+       printk("Board type: %s\n", get_system_type());
 }
 }
index 9e6099e6962266ed27023c9bdcbb59c32fa4b96c..ae4a92c3e529bf8cfd09d5cbbd19508d95776292 100644 (file)
@@ -221,10 +221,10 @@ static int __init initrd_setup(char *str)
                goto fail;
        }
        initrd_end = initrd_start + initrd_size;
                goto fail;
        }
        initrd_end = initrd_start + initrd_size;
-       prom_printf("Found initrd of %lx@%lx\n", initrd_size, initrd_start);
+       printk("Found initrd of %lx@%lx\n", initrd_size, initrd_start);
        return 1;
  fail:
        return 1;
  fail:
-       prom_printf("Bad initrd argument.  Disabling initrd\n");
+       printk("Bad initrd argument.  Disabling initrd\n");
        initrd_start = 0;
        initrd_end = 0;
        return 1;
        initrd_start = 0;
        initrd_end = 0;
        return 1;
@@ -281,7 +281,7 @@ void __init prom_init(void)
        }
        if (cfe_eptseal != CFE_EPTSEAL) {
                /* too early for panic to do any good */
        }
        if (cfe_eptseal != CFE_EPTSEAL) {
                /* too early for panic to do any good */
-               prom_printf("CFE's entrypoint seal doesn't match. Spinning.");
+               printk("CFE's entrypoint seal doesn't match. Spinning.");
                while (1) ;
        }
        cfe_init(cfe_handle, cfe_ept);
                while (1) ;
        }
        cfe_init(cfe_handle, cfe_ept);
@@ -303,7 +303,7 @@ void __init prom_init(void)
                } else {
                        /* The loader should have set the command line */
                        /* too early for panic to do any good */
                } else {
                        /* The loader should have set the command line */
                        /* too early for panic to do any good */
-                       prom_printf("LINUX_CMDLINE not defined in cfe.");
+                       printk("LINUX_CMDLINE not defined in cfe.");
                        while (1) ;
                }
        }
                        while (1) ;
                }
        }
index d0ee1d5b822388bfaf32496da80d9b8238903fdf..1cb042eab7201941c4625d9ba179baf854672617 100644 (file)
@@ -67,7 +67,7 @@ static int __init sys_rev_decode(void)
                ret = setup_bcm112x();
                break;
        default:
                ret = setup_bcm112x();
                break;
        default:
-               prom_printf("Unknown SOC type %x\n", soc_type);
+               printk("Unknown SOC type %x\n", soc_type);
                ret = 1;
                break;
        }
                ret = 1;
                break;
        }
@@ -112,7 +112,7 @@ static int __init setup_bcm1250(void)
                        pass_str = "A0-A6";
                        war_pass = K_SYS_REVISION_BCM1250_PASS2;
                } else {
                        pass_str = "A0-A6";
                        war_pass = K_SYS_REVISION_BCM1250_PASS2;
                } else {
-                       prom_printf("Unknown BCM1250 rev %x\n", soc_pass);
+                       printk("Unknown BCM1250 rev %x\n", soc_pass);
                        ret = 1;
                }
                break;
                        ret = 1;
                }
                break;
@@ -140,7 +140,7 @@ static int __init setup_bcm112x(void)
                pass_str = "A2";
                break;
        default:
                pass_str = "A2";
                break;
        default:
-               prom_printf("Unknown %s rev %x\n", soc_str, soc_pass);
+               printk("Unknown %s rev %x\n", soc_str, soc_pass);
                ret = 1;
        }
        return ret;
                ret = 1;
        }
        return ret;
@@ -158,21 +158,21 @@ void __init sb1250_setup(void)
        soc_pass = G_SYS_REVISION(sys_rev);
 
        if (sys_rev_decode()) {
        soc_pass = G_SYS_REVISION(sys_rev);
 
        if (sys_rev_decode()) {
-               prom_printf("Restart after failure to identify SiByte chip\n");
+               printk("Restart after failure to identify SiByte chip\n");
                machine_restart(NULL);
        }
 
        plldiv = G_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
        zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25);
 
                machine_restart(NULL);
        }
 
        plldiv = G_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
        zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25);
 
-       prom_printf("Broadcom SiByte %s %s @ %d MHz (SB1 rev %d)\n",
+       printk("Broadcom SiByte %s %s @ %d MHz (SB1 rev %d)\n",
                    soc_str, pass_str, zbbus_mhz * 2, sb1_pass);
                    soc_str, pass_str, zbbus_mhz * 2, sb1_pass);
-       prom_printf("Board type: %s\n", get_system_type());
+       printk("Board type: %s\n", get_system_type());
 
        switch (war_pass) {
        case K_SYS_REVISION_BCM1250_PASS1:
 #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS
 
        switch (war_pass) {
        case K_SYS_REVISION_BCM1250_PASS1:
 #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS
-               prom_printf("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, "
+               printk("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, "
                            "and the kernel doesn't have the proper "
                            "workarounds compiled in. @@@@\n");
                bad_config = 1;
                            "and the kernel doesn't have the proper "
                            "workarounds compiled in. @@@@\n");
                bad_config = 1;
@@ -182,27 +182,27 @@ void __init sb1250_setup(void)
                /* Pass 2 - easiest as default for now - so many numbers */
 #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \
     !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS)
                /* Pass 2 - easiest as default for now - so many numbers */
 #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \
     !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS)
-               prom_printf("@@@@ This is a BCM1250 A3-A10 board, and the "
+               printk("@@@@ This is a BCM1250 A3-A10 board, and the "
                            "kernel doesn't have the proper workarounds "
                            "compiled in. @@@@\n");
                bad_config = 1;
 #endif
 #ifdef CONFIG_CPU_HAS_PREFETCH
                            "kernel doesn't have the proper workarounds "
                            "compiled in. @@@@\n");
                bad_config = 1;
 #endif
 #ifdef CONFIG_CPU_HAS_PREFETCH
-               prom_printf("@@@@ Prefetches may be enabled in this kernel, "
+               printk("@@@@ Prefetches may be enabled in this kernel, "
                            "but are buggy on this board.  @@@@\n");
                bad_config = 1;
 #endif
                break;
        case K_SYS_REVISION_BCM1250_PASS2_2:
 #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS
                            "but are buggy on this board.  @@@@\n");
                bad_config = 1;
 #endif
                break;
        case K_SYS_REVISION_BCM1250_PASS2_2:
 #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS
-               prom_printf("@@@@ This is a BCM1250 B1/B2. board, and the "
+               printk("@@@@ This is a BCM1250 B1/B2. board, and the "
                            "kernel doesn't have the proper workarounds "
                            "compiled in. @@@@\n");
                bad_config = 1;
 #endif
 #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \
     !defined(CONFIG_CPU_HAS_PREFETCH)
                            "kernel doesn't have the proper workarounds "
                            "compiled in. @@@@\n");
                bad_config = 1;
 #endif
 #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \
     !defined(CONFIG_CPU_HAS_PREFETCH)
-               prom_printf("@@@@ This is a BCM1250 B1/B2, but the kernel is "
+               printk("@@@@ This is a BCM1250 B1/B2, but the kernel is "
                            "conservatively configured for an 'A' stepping. "
                            "@@@@\n");
 #endif
                            "conservatively configured for an 'A' stepping. "
                            "@@@@\n");
 #endif
@@ -211,7 +211,7 @@ void __init sb1250_setup(void)
                break;
        }
        if (bad_config) {
                break;
        }
        if (bad_config) {
-               prom_printf("Invalid configuration for this chip.\n");
+               printk("Invalid configuration for this chip.\n");
                machine_restart(NULL);
        }
 }
                machine_restart(NULL);
        }
 }
index 6a44bbf0b732e7cab43bfb0d8a8256972c111259..643366eb854a6de81cfb9abd4a86cd2da5193fe2 100644 (file)
@@ -9,6 +9,8 @@
  * Copyright (C) 2005-2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
  */
 
  * Copyright (C) 2005-2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
  */
 
+#define DEBUG
+
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/string.h>
 #define PROM_ENTRY(x)          (PROM_VEC + (x))
 
 
 #define PROM_ENTRY(x)          (PROM_VEC + (x))
 
 
-#define DEBUG
-#ifdef DEBUG
-#define DBG_PRINTF(x...)     prom_printf(x)
-#else
-#define DBG_PRINTF(x...)
-#endif
-
 static int *(*__prom_putchar)(int)        = (int *(*)(int))PROM_ENTRY(PROM_PUTCHAR);
 static int *(*__prom_putchar)(int)        = (int *(*)(int))PROM_ENTRY(PROM_PUTCHAR);
+
+void prom_putchar(char c)
+{
+       __prom_putchar(c);
+}
+
 static char *(*__prom_getenv)(char *)     = (char *(*)(char *))PROM_ENTRY(PROM_GETENV);
 static void (*__prom_get_memconf)(void *) = (void (*)(void *))PROM_ENTRY(PROM_GET_MEMCONF);
 
 static char *(*__prom_getenv)(char *)     = (char *(*)(char *))PROM_ENTRY(PROM_GETENV);
 static void (*__prom_get_memconf)(void *) = (void (*)(void *))PROM_ENTRY(PROM_GET_MEMCONF);
 
@@ -48,26 +49,6 @@ char *prom_getenv (char *s)
        return __prom_getenv(s);
 }
 
        return __prom_getenv(s);
 }
 
-void prom_printf(char *fmt, ...)
-{
-       va_list args;
-       char ppbuf[1024];
-       char *bptr;
-
-       va_start(args, fmt);
-       vsprintf(ppbuf, fmt, args);
-
-       bptr = ppbuf;
-
-       while (*bptr != 0) {
-               if (*bptr == '\n')
-                       __prom_putchar('\r');
-
-               __prom_putchar(*bptr++);
-       }
-       va_end(args);
-}
-
 void __init prom_free_prom_memory(void)
 {
 }
 void __init prom_free_prom_memory(void)
 {
 }
@@ -94,15 +75,15 @@ static void sni_idprom_dump(void)
 {
        int     i;
 
 {
        int     i;
 
-       prom_printf("SNI IDProm dump:\n");
+       pr_debug("SNI IDProm dump:\n");
        for (i = 0; i < 256; i++) {
                if (i%16 == 0)
        for (i = 0; i < 256; i++) {
                if (i%16 == 0)
-                       prom_printf("%04x ", i);
+                       pr_debug("%04x ", i);
 
 
-               prom_printf("%02x ", *(unsigned char *) (SNI_IDPROM_BASE + i));
+               printk("%02x ", *(unsigned char *) (SNI_IDPROM_BASE + i));
 
                if (i % 16 == 15)
 
                if (i % 16 == 15)
-                       prom_printf("\n");
+                       printk("\n");
        }
 }
 #endif
        }
 }
 #endif
@@ -121,12 +102,12 @@ static void sni_mem_init(void )
        /* MemSIZE from prom in 16MByte chunks */
        memsize = *((unsigned char *) SNI_IDPROM_MEMSIZE) * 16;
 
        /* MemSIZE from prom in 16MByte chunks */
        memsize = *((unsigned char *) SNI_IDPROM_MEMSIZE) * 16;
 
-       DBG_PRINTF("IDProm memsize: %lu MByte\n", memsize);
+       pr_debug("IDProm memsize: %lu MByte\n", memsize);
 
        /* get memory bank layout from prom */
        __prom_get_memconf(&memconf);
 
 
        /* get memory bank layout from prom */
        __prom_get_memconf(&memconf);
 
-       DBG_PRINTF("prom_get_mem_conf memory configuration:\n");
+       pr_debug("prom_get_mem_conf memory configuration:\n");
        for (i = 0;i < 8 && memconf[i].size; i++) {
                if (sni_brd_type == SNI_BRD_PCI_TOWER ||
                    sni_brd_type == SNI_BRD_PCI_TOWER_CPLUS) {
        for (i = 0;i < 8 && memconf[i].size; i++) {
                if (sni_brd_type == SNI_BRD_PCI_TOWER ||
                    sni_brd_type == SNI_BRD_PCI_TOWER_CPLUS) {
@@ -135,7 +116,7 @@ static void sni_mem_init(void )
                                memconf[i].base -= 0x20000000;
                        }
        }
                                memconf[i].base -= 0x20000000;
                        }
        }
-               DBG_PRINTF("Bank%d: %08x @ %08x\n", i,
+               pr_debug("Bank%d: %08x @ %08x\n", i,
                        memconf[i].size, memconf[i].base);
                add_memory_region(memconf[i].base, memconf[i].size, BOOT_MEM_RAM);
        }
                        memconf[i].size, memconf[i].base);
                add_memory_region(memconf[i].base, memconf[i].size, BOOT_MEM_RAM);
        }
@@ -248,7 +229,7 @@ void __init prom_init(void)
                systype = "RM300-Exx";
                break;
        }
                systype = "RM300-Exx";
                break;
        }
-       DBG_PRINTF("Found SNI brdtype %02x name %s\n", sni_brd_type,systype);
+       pr_debug("Found SNI brdtype %02x name %s\n", sni_brd_type,systype);
 
 #ifdef DEBUG
        sni_idprom_dump();
 
 #ifdef DEBUG
        sni_idprom_dump();
index 181afc5c0f1d3e9b0b3119bc83fc13b2ade36f3b..42077e367a5bbe44dc38b63735aae3c4047812bd 100644 (file)
@@ -237,8 +237,6 @@ static inline void lasat_ndelay(unsigned int ns)
             __delay(ns / lasat_ndelay_divider);
 }
 
             __delay(ns / lasat_ndelay_divider);
 }
 
-extern void (* prom_printf)(const char *fmt, ...);
-
 #endif /* !defined (_LANGUAGE_ASSEMBLY) */
 
 #define LASAT_SERVICEMODE_MAGIC_1     0xdeadbeef
 #endif /* !defined (_LANGUAGE_ASSEMBLY) */
 
 #define LASAT_SERVICEMODE_MAGIC_1     0xdeadbeef
index 7bf6f5f6ab9c0845db161e521d21cef8d9ad642b..daaf9f98fc63ce7547a3660b915cb0ee2599e547 100644 (file)
@@ -28,8 +28,6 @@
 
 extern char *prom_getcmdline(void);
 extern char *prom_getenv(char *name);
 
 extern char *prom_getcmdline(void);
 extern char *prom_getenv(char *name);
-extern void setup_prom_printf(int tty_no);
-extern void prom_printf(char *fmt, ...);
 extern void prom_init_cmdline(void);
 extern void prom_meminit(void);
 extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem);
 extern void prom_init_cmdline(void);
 extern void prom_meminit(void);
 extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem);
index 73f09731550236874b41c13ffbd3c631370f96ea..bfce5c786f1c2772c0a5515c3e10b62b7e6d6185 100644 (file)
@@ -33,9 +33,6 @@ extern int prom_flags;
 extern void prom_putchar(char c);
 extern char prom_getchar(void);
 
 extern void prom_putchar(char c);
 extern char prom_getchar(void);
 
-/* Generic printf() using ARCS console I/O. */
-extern void prom_printf(char *fmt, ...);
-
 /* Memory descriptor management. */
 #define PROM_MAX_PMEMBLOCKS    32
 struct prom_pmemblock {
 /* Memory descriptor management. */
 #define PROM_MAX_PMEMBLOCKS    32
 struct prom_pmemblock {
index 2ba6988ddc8e897a3c43fdd2844d08a625a7d054..dfb29e13bce0c5d162a297c851538eaef2603049 100644 (file)
@@ -57,8 +57,6 @@ extern void bcm1480_mask_irq(int cpu, int irq);
 extern void bcm1480_unmask_irq(int cpu, int irq);
 extern void bcm1480_smp_finish(void);
 
 extern void bcm1480_unmask_irq(int cpu, int irq);
 extern void bcm1480_smp_finish(void);
 
-extern void prom_printf(char *fmt, ...);
-
 #define AT_spin \
        __asm__ __volatile__ (          \
                ".set noat\n"           \
 #define AT_spin \
        __asm__ __volatile__ (          \
                ".set noat\n"           \