Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

* 'master' of git://git.denx.de/u-boot-cfi-flash:
  cfi: fix the incomplete erased status check in buffer write
diff --git a/README b/README
index 1f8bd20..b69a3b6 100644
--- a/README
+++ b/README
@@ -644,23 +644,6 @@
 		'Sane' compilers will generate smaller code if
 		CONFIG_PRE_CON_BUF_SZ is a power of 2
 
-- Pre-console putc():
-		Prior to the console being initialised, console output is
-		normally silently discarded. This can be annoying if a
-		panic() happens in this time.
-
-		If the CONFIG_PRE_CONSOLE_PUTC option is defined, then
-		U-Boot will call board_pre_console_putc() for each output
-		character in this case, This function should try to output
-		the character if possible, perhaps on all available UARTs
-		(it will need to do this directly, since the console code
-		is not functional yet). Note that if the panic happens
-		early enough, then it is possible that board_init_f()
-		(or even arch_cpu_init() on ARM) has not been called yet.
-		You should init all clocks, GPIOs, etc. that are needed
-		to get the character out. Baud rates will need to default
-		to something sensible.
-
 - Safe printf() functions
 		Define CONFIG_SYS_VSNPRINTF to compile in safe versions of
 		the printf() functions. These are defined in
diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S
index 1d1fcf7..889bf8b 100644
--- a/arch/nds32/cpu/n1213/start.S
+++ b/arch/nds32/cpu/n1213/start.S
@@ -68,15 +68,17 @@
 	j	tlb_not_present
 	j	tlb_misc
 	j	tlb_vlpt_miss
-	j	cache_parity_error
+	j	machine_error
 	j	debug
 	j	general_exception
+	j	syscall
 	j	internal_interrupt		! H0I
 	j	internal_interrupt		! H1I
 	j	internal_interrupt		! H2I
 	j	internal_interrupt		! H3I
 	j	internal_interrupt		! H4I
 	j	internal_interrupt		! H5I
+	j	software_interrupt		! S0I
 
 	.balign 16
 
@@ -477,7 +479,7 @@
 	bal	do_interruption
 
 	.align	5
-cache_parity_error:
+machine_error:
 	SAVE_ALL
 	move	$r0, $sp			! To get the kernel stack
 	li	$r1, 5				! Determine interruption type
@@ -498,13 +500,27 @@
 	bal	do_interruption
 
 	.align	5
-internal_interrupt:
+syscall:
 	SAVE_ALL
 	move	$r0, $sp			! To get the kernel stack
 	li	$r1, 8				! Determine interruption type
 	bal	do_interruption
 
 	.align	5
+internal_interrupt:
+	SAVE_ALL
+	move	$r0, $sp			! To get the kernel stack
+	li	$r1, 9				! Determine interruption type
+	bal	do_interruption
+
+	.align	5
+software_interrupt:
+	SAVE_ALL
+	move	$r0, $sp			! To get the kernel stack
+	li	$r1, 10				! Determine interruption type
+	bal	do_interruption
+
+	.align	5
 
 /*
  * void reset_cpu(ulong addr);
diff --git a/arch/nds32/include/asm/ptrace.h b/arch/nds32/include/asm/ptrace.h
index 4336083..ee181b2 100644
--- a/arch/nds32/include/asm/ptrace.h
+++ b/arch/nds32/include/asm/ptrace.h
@@ -38,6 +38,8 @@
 	NDS32_REG d1hi;
 	NDS32_REG d1lo;
 	NDS32_REG r[26];	/* r0 - r25 */
+	NDS32_REG p0;		/* r26 - used by OS */
+	NDS32_REG p1;		/* r27 - used by OS */
 	NDS32_REG fp;		/* r28 */
 	NDS32_REG gp;		/* r29 */
 	NDS32_REG lp;		/* r30 */
diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c
index 974d52a..ca8c227 100644
--- a/arch/nds32/lib/interrupts.c
+++ b/arch/nds32/lib/interrupts.c
@@ -91,7 +91,7 @@
 	printf("D1H: %08lx  D1L: %08lx  D0H: %08lx  D0L: %08lx\n",
 		regs->d1hi, regs->d1lo, regs->d0hi, regs->d0lo);
 	printf("r27: %08lx  r26: %08lx  r25: %08lx  r24: %08lx\n",
-		regs->r[27], regs->r[26], regs->r[25], regs->r[24]);
+		regs->p1, regs->p0, regs->r[25], regs->r[24]);
 	printf("r23: %08lx  r22: %08lx  r21: %08lx  r20: %08lx\n",
 		regs->r[23], regs->r[22], regs->r[21], regs->r[20]);
 	printf("r19: %08lx  r18: %08lx  r17: %08lx  r16: %08lx\n",
diff --git a/board/etx094/u-boot.lds b/board/etx094/u-boot.lds
index b00d2b3..8465937 100644
--- a/board/etx094/u-boot.lds
+++ b/board/etx094/u-boot.lds
@@ -36,7 +36,6 @@
     arch/powerpc/cpu/mpc8xx/traps.o	(.text*)
     net/libnet.o			(.text*)
     arch/powerpc/cpu/mpc8xx/libmpc8xx.o	(.text*)
-    *(.text.printf)
     *(.text.vsprintf)
 
     . = env_offset;
diff --git a/common/console.c b/common/console.c
index 1d9fd7f..1177f7d 100644
--- a/common/console.c
+++ b/common/console.c
@@ -329,19 +329,14 @@
 	return serial_tstc();
 }
 
-#if defined(CONFIG_PRE_CONSOLE_BUFFER) || defined(CONFIG_PRE_CONSOLE_PUTC)
+#ifdef CONFIG_PRE_CONSOLE_BUFFER
 #define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ)
 
 static void pre_console_putc(const char c)
 {
-#ifdef CONFIG_PRE_CONSOLE_BUFFER
 	char *buffer = (char *)CONFIG_PRE_CON_BUF_ADDR;
 
 	buffer[CIRC_BUF_IDX(gd->precon_buf_idx++)] = c;
-#endif
-#ifdef CONFIG_PRE_CONSOLE_PUTC
-	board_pre_console_putc(c);
-#endif
 }
 
 static void pre_console_puts(const char *s)
@@ -352,7 +347,6 @@
 
 static void print_pre_console_buffer(void)
 {
-#ifdef CONFIG_PRE_CONSOLE_BUFFER
 	unsigned long i = 0;
 	char *buffer = (char *)CONFIG_PRE_CON_BUF_ADDR;
 
@@ -361,9 +355,7 @@
 
 	while (i < gd->precon_buf_idx)
 		putc(buffer[CIRC_BUF_IDX(i++)]);
-#endif
 }
-
 #else
 static inline void pre_console_putc(const char c) {}
 static inline void pre_console_puts(const char *s) {}
diff --git a/include/common.h b/include/common.h
index 85eaa77..74d9704 100644
--- a/include/common.h
+++ b/include/common.h
@@ -291,13 +291,6 @@
 extern u8 _binary_dt_dtb_start[];	/* embedded device tree blob */
 int set_cpu_clk_info(void);
 
-/*
- * Called when console output is requested before the console is available.
- * The board should do its best to get the character out to the user any way
- * it can.
- */
-void board_pre_console_putc(int ch);
-
 /* common/flash.c */
 void flash_perror (int);