]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
m68k/lib: fix serial driver relocation
authorangelo <sysamfw@gmail.com>
Fri, 23 Nov 2012 12:23:39 +0000 (12:23 +0000)
committerTom Rini <trini@ti.com>
Fri, 11 Jan 2013 21:41:14 +0000 (14:41 -0700)
Fix coldfire serial driver bindings no more relocated to ram after last
changes to drivers/serial/serial.c (regression).
Serial initialization in ram has to be called after that gd->reloc_off is
calculated.

Signed-off-by: Angelo Dureghello <sysamfw@gmail.com>
Cc: Jason Jin <jason.jin@freescale.com>
Acked-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
Tested-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
arch/m68k/lib/board.c

index 794b8679fefe2696bef4a8857f5b6d036b0c8882..e934cb6c25f5d49eebcb50b8535d1e74ae6f7e92 100644 (file)
@@ -402,14 +402,14 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
 
-       serial_initialize();
-
        debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr);
 
        WATCHDOG_RESET ();
 
        gd->reloc_off =  dest_addr - CONFIG_SYS_MONITOR_BASE;
 
+       serial_initialize();
+
        monitor_flash_len = (ulong)&__init_end - dest_addr;
 
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)