Re: [U-Boot-Users] [PATCH] ads5121: support for running from memory

2008-10-24 Thread Jean-Christophe PLAGNIOL-VILLARD
On 21:55 Thu 25 Sep , Nikita V. Youshchenko wrote:
 commit 599e6d1ff1fbab0abda4ef685f6078c4d2f1d2eb
 Author: Nikita V. Youshchenko [EMAIL PROTECTED]
 Date:   Tue Sep 2 07:51:05 2008 +0400
 
 ads5121: support for running from memory
 
 This patch makes it possible to start u-boot from memory on ads5121 board.
 
 It does two simple things:
 - skips initialization of memory controller if already running from 
 memory,
 - helps u-boot to find it's environment in flash when CFG_MONITOR_BASE 
 does
   not point to u-boot flash address.
 
 Signed-off-by: Nikita V. Youshchenko [EMAIL PROTECTED]
 
Could you rebase it against current HEAD?

Best Regards,
J.

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] ads5121: support for running from memory

2008-10-04 Thread Nikita V. Youshchenko
commit 599e6d1ff1fbab0abda4ef685f6078c4d2f1d2eb
Author: Nikita V. Youshchenko [EMAIL PROTECTED]
Date:   Tue Sep 2 07:51:05 2008 +0400

ads5121: support for running from memory

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

It does two simple things:
- skips initialization of memory controller if already running from memory,
- helps u-boot to find it's environment in flash when CFG_MONITOR_BASE does
  not point to u-boot flash address.

Signed-off-by: Nikita V. Youshchenko [EMAIL PROTECTED]

diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index deaa292..644d85e 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 *) CFG_IMMR;
u32 msize = CFG_DDR_SIZE * 1024 * 1024;
+#if CFG_MONITOR_BASE = CFG_FLASH_BASE
+   volatile immap_t *im = (immap_t *) CFG_IMMR;
u32 msize_log2 = __ilog2 (msize);
u32 i;
 
@@ -203,7 +204,7 @@ long int fixed_sdram (void)
/* Start MDDRC */
im-mddrc.ddr_time_config0 = CFG_MDDRC_TIME_CFG0_RUN;
im-mddrc.ddr_sys_config = CFG_MDDRC_SYS_CFG_RUN;
-
+#endif
return msize;
 }
 
diff --git a/include/configs/ads5121.h b/include/configs/ads5121.h
index d6f7e02..6ff7762 100644
--- a/include/configs/ads5121.h
+++ b/include/configs/ads5121.h
@@ -322,7 +322,12 @@
  */
 #define CONFIG_ENV_IS_IN_FLASH 1
 /* This has to be a multiple of the Flash sector size */
+#if CFG_MONITOR_BASE = CFG_FLASH_BASE
 #define CONFIG_ENV_ADDR(CFG_MONITOR_BASE + CFG_MONITOR_LEN)
+#else
+#define CFG_MONITOR_FLASH_BASE 0xfff0
+#define CONFIG_ENV_ADDR(CFG_MONITOR_FLASH_BASE + 
CFG_MONITOR_LEN)
+#endif
 #define CONFIG_ENV_SIZE0x2000
 #ifdef CONFIG_BKUP_FLASH
 #define CONFIG_ENV_SECT_SIZE   0x2 /* one sector (256K) for env */


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=100url=/___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users