Patchwork [U-Boot,v2] mips: serial: Fix busted manual relocation

login
register
mail settings
Submitter Daniel Schwierzeck
Date Dec. 12, 2012, 12:41 p.m.
Message ID <1355316111-16056-1-git-send-email-daniel.schwierzeck@gmail.com>
Download mbox | patch
Permalink /patch/205501/
State Accepted
Delegated to: Daniel Schwierzeck
Headers show

Comments

Daniel Schwierzeck - Dec. 12, 2012, 12:41 p.m.
From: Joe Hershberger <joe.hershberger@ni.com>

serial_initialize() must be called after relocation to adjust the
pointers to putc(), getc(), etc.  This is busted ever since the
serial driver-model-ification series.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
Changes for v2:
- include <serial.h> to fix gcc-4.7 warnings

This patch depends on http://patchwork.ozlabs.org/patch/205498/ to compile
without warnings.

 arch/mips/lib/board.c | 3 +++
 1 file changed, 3 insertions(+)

--
1.8.0

Patch

diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
index 4f330cc..d79e183 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -24,6 +24,7 @@ 
 #include <common.h>
 #include <command.h>
 #include <malloc.h>
+#include <serial.h>
 #include <stdio_dev.h>
 #include <version.h>
 #include <net.h>
@@ -262,6 +263,8 @@  void board_init_r(gd_t *id, ulong dest_addr)

 	monitor_flash_len = (ulong)&uboot_end_data - dest_addr;

+	serial_initialize();
+
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 	/*
 	 * We have to relocate the command table manually