Incremental patch. Should be applied above its v2:
http://lists.denx.de/pipermail/u-boot/2010-April/070729.html
(Sorry for inconvenience. I will use --in-reply-to option next time)

In the patch:
- Fix for hcu4 board;
- post.h - preprocessor conditional inclusions optimization.

Signed-off-by: Michael Zaidman <michael.zaid...@gmail.com>
---
 include/configs/hcu4.h |    2 +-
 include/post.h         |   18 +++++-------------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/include/configs/hcu4.h b/include/configs/hcu4.h
index b01f8b1..26992e7 100644
--- a/include/configs/hcu4.h
+++ b/include/configs/hcu4.h
@@ -72,7 +72,7 @@
 #define CONFIG_SYS_INIT_RAM_END        CONFIG_SYS_OCM_DATA_SIZE
 #define CONFIG_SYS_GBL_DATA_SIZE       256             /* num bytes initial 
data */
 #define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_POST_WORD_ADDR
+#define CONFIG_SYS_INIT_SP_OFFSET      (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*-----------------------------------------------------------------------
  * Serial Port
diff --git a/include/post.h b/include/post.h
index 296e1d5..939310b 100644
--- a/include/post.h
+++ b/include/post.h
@@ -35,31 +35,24 @@
 
 #ifdef CONFIG_MPC5xxx
 #define _POST_WORD_ADDR        (MPC5XXX_SRAM + MPC5XXX_SRAM_POST_SIZE)
-#endif
 
-#if defined(CONFIG_MPC821) || defined(CONFIG_MPC823) || \
-       defined(CONFIG_MPC855) || defined(CONFIG_MPC855T)|| \
-       defined(CONFIG_MPC850) || defined(CONFIG_MPC86x)
+#elif defined(CONFIG_8xx)
 #define _POST_WORD_ADDR \
        (((immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_dpmem + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_MPC8260
+#elif defined(CONFIG_MPC8260)
 #include <asm/cpm_8260.h>
 #define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_MPC8360
+#elif defined(CONFIG_MPC8360)
 #include <asm/immap_qe.h>
 #define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_MPC85xx
+#elif defined (CONFIG_MPC85xx)
 #include <asm/cpm_85xx.h>
 #define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_4xx
+#elif defined (CONFIG_4xx)
 #define _POST_WORD_ADDR \
        (CONFIG_SYS_OCM_DATA_ADDR + CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 #endif
@@ -67,7 +60,6 @@
 #ifndef _POST_WORD_ADDR
 #error "_POST_WORD_ADDR currently not implemented for this platform!"
 #endif
-
 #endif /* CONFIG_SYS_POST_WORD_ADDR */
 
 static inline ulong post_word_load (void)
-- 
1.6.3.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to