> You missed some changes in the rebase.
>
> All CFG_ macros have been  renamed to CONFIG_SYS_

This version should be betterŅŽ

From ad29d5a0c120e4eee51ecbb8a294c8492cf5fdd0 Mon Sep 17 00:00:00 2001
From: Nikita V. Youshchenko <[EMAIL PROTECTED]>
Date: Tue, 2 Sep 2008 07:51:05 +0400
Subject: [PATCH] ads5121: support for running from RAM

This patch makes it possible to start u-boot from RAM on ads5121 board.

It does two simple things:
- skips initialization of RAM controller if already running from RAM,
- makes CONFIG_ENV_ADDR absolute, not relative to CFG_MONITOR_BASE

Signed-off-by: Nikita V. Youshchenko <[EMAIL PROTECTED]>
---
 board/ads5121/ads5121.c   |    5 +++--
 include/configs/ads5121.h |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index 0610928..9e4a29c 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -120,8 +120,9 @@ phys_size_t initdram (int board_type)
  */
 long int fixed_sdram (void)
 {
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = CONFIG_SYS_DDR_SIZE * 1024 * 1024;
+#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE
+       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize_log2 = __ilog2 (msize);
        u32 i;
 
@@ -203,7 +204,7 @@ long int fixed_sdram (void)
        /* Start MDDRC */
        im->mddrc.ddr_time_config0 = CONFIG_SYS_MDDRC_TIME_CFG0_RUN;
        im->mddrc.ddr_sys_config = CONFIG_SYS_MDDRC_SYS_CFG_RUN;
-
+#endif
        return msize;
 }
 
diff --git a/include/configs/ads5121.h b/include/configs/ads5121.h
index bb3525f..7a5cdf0 100644
--- a/include/configs/ads5121.h
+++ b/include/configs/ads5121.h
@@ -322,7 +322,7 @@
  */
 #define CONFIG_ENV_IS_IN_FLASH 1
 /* This has to be a multiple of the Flash sector size */
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE + 
CONFIG_SYS_MONITOR_LEN)
+#define CONFIG_ENV_ADDR                0xfff40000
 #define CONFIG_ENV_SIZE                0x2000
 #ifdef CONFIG_BKUP_FLASH
 #define CONFIG_ENV_SECT_SIZE   0x20000 /* one sector (256K) for env */
-- 
1.5.6.5


Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to