Patchwork [U-Boot] powerpc/8xxx: Fix _POST_WORD_ADDR on 85xx & 86xx systems

login
register
mail settings
Submitter Peter Tyser
Date Dec. 2, 2010, 8:21 p.m.
Message ID <1291321266.20072.571.camel@petert>
Download mbox | patch
Permalink /patch/74020/
State Superseded
Delegated to: Kumar Gala
Headers show

Comments

Peter Tyser - Dec. 2, 2010, 8:21 p.m.
Hi Kumar,

>  #elif defined (CONFIG_MPC85xx)
>  #include <asm/immap_85xx.h>
> -#define _POST_WORD_ADDR	(CONFIG_SYS_IMMR + offsetof(ccsr_pic_t, tfrr))
> +#define _POST_WORD_ADDR	(CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_PIC_OFFSET + \
> +				offsetof(ccsr_pic_t, tfrr))
>  #elif defined (CONFIG_MPC86xx)
>  #include <asm/immap_86xx.h>
> -#define _POST_WORD_ADDR	(CONFIG_SYS_IMMR + offsetof(ccsr_pic_t, tfrr))
> +#define _POST_WORD_ADDR	(CONFIG_SYS_IMMR + CONFIG_SYS_MPC86xx_PIC_OFFSET + \
> +				offsetof(ccsr_pic_t, tfrr))
>  
>  #elif defined (CONFIG_4xx)
>  #define _POST_WORD_ADDR \

John Schmoller just submitted the same patch internally, but used
CONFIG_SYS_MPC8xxx_PIC_ADDR instead of (IMMR + OFFSET).  Its a bit
cleaner, and allows combining the 85xx and 86xx case.  common.h should
already include asm/immap8[56]xx.h.

Best,
Peter

Patch

diff --git a/include/post.h b/include/post.h
index 957ce3b..15a20c1 100644
--- a/include/post.h
+++ b/include/post.h
@@ -56,14 +56,8 @@ 
 #include <asm/immap_qe.h>
 #define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
 
-#elif defined (CONFIG_MPC85xx)
-#include <asm/immap_85xx.h>
-#define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + offsetof(ccsr_pic_t, tfrr))
-
-#elif defined (CONFIG_MPC86xx)
-#include <asm/immap_86xx.h>
-#define _POST_WORD_ADDR        (CONFIG_SYS_IMMR + offsetof(ccsr_pic_t, tfrr))
-
+#elif defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
+#define _POST_WORD_ADDR        (CONFIG_SYS_MPC8xxx_PIC_ADDR + offsetof(ccsr_pic_t, tfrr))
 #elif defined (CONFIG_4xx)
 #define _POST_WORD_ADDR \
        (CONFIG_SYS_OCM_DATA_ADDR + CONFIG_SYS_GBL_DATA_OFFSET - 0x4)