[U-Boot-Users] ColdFire: M5282 update booting error

Liew Tsi Chung-r5aahp Tsi-chung.Liew at freescale.com
Wed Oct 17 22:28:53 CEST 2007


Wolfgang,

	This is the patch for fixing M5282 booting error.

Regards,
TsiChung


>From a26d43653288d3479bc7b501ecef6a63d9f2ae3b Mon Sep 17 00:00:00 2001
From: TsiChungLiew <Tsi-Chung.Liew at freescale.com>
Date: Wed, 17 Oct 2007 15:08:24 -0500
Subject: [PATCH] ColdFire: Fixed M5282EVB booting at external flash

Signed-off-by: TsiChungLiew <Tsi-Chung.Liew at freescale.com>
---
 board/m5282evb/m5282evb.c  |    1 +
 cpu/mcf52x2/start.S        |    6 +++++-
 include/configs/M5282EVB.h |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/board/m5282evb/m5282evb.c b/board/m5282evb/m5282evb.c
index 243d6a4..7d6d1d6 100644
--- a/board/m5282evb/m5282evb.c
+++ b/board/m5282evb/m5282evb.c
@@ -89,4 +89,5 @@ long int initdram (int board_type)
 		/* Write to the SDRAM Mode Register */
 		*(u32 *)(CFG_SDRAM_BASE + 0x400) = 0xA5A59696;
 	}
+	return dramsize;
 }
diff --git a/cpu/mcf52x2/start.S b/cpu/mcf52x2/start.S
index 686e2a5..260a09a 100644
--- a/cpu/mcf52x2/start.S
+++ b/cpu/mcf52x2/start.S
@@ -58,7 +58,7 @@ _vectors:
 .long	0x00000000		/* Flash offset is 0 until we setup CS0
*/
 #if defined(CONFIG_R5200)
 .long	0x400
-#elif defined(CONFIG_M5282)
+#elif defined(CONFIG_M5282) && (TEXT_BASE == CFG_INT_FLASH_BASE)
 .long	_start - TEXT_BASE
 #else
 .long	_START
@@ -177,7 +177,11 @@ _after_flashbar_copy:
 	 * therefore no VBR to set
 	 */
 #if !defined(CONFIG_MONITOR_IS_IN_RAM)
+#if defined(CONFIG_M5282) && (TEXT_BASE == CFG_INT_FLASH_BASE)
+	move.l	#CFG_INT_FLASH_BASE, %d0
+#else
 	move.l	#CFG_FLASH_BASE, %d0
+#endif
 	movec	%d0, %VBR
 #endif
 
diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h
index 3c17c1e..7bb9f60 100644
--- a/include/configs/M5282EVB.h
+++ b/include/configs/M5282EVB.h
@@ -163,7 +163,7 @@
  * Please note that CFG_SDRAM_BASE _must_ start at 0
  */
 #define CFG_SDRAM_BASE		0x00000000
-#define	CFG_SDRAM_SIZE		8	/* SDRAM size in MB */
+#define	CFG_SDRAM_SIZE		16	/* SDRAM size in MB */
 #define CFG_FLASH_BASE		0xffe00000
 #define	CFG_INT_FLASH_BASE	0xf0000000
 #define CFG_INT_FLASH_ENABLE	0x21
-- 
1.5.2




More information about the U-Boot mailing list