public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] powerpc/8xxx: Fix _POST_WORD_ADDR on 85xx & 86xx systems
@ 2010-12-01 12:49 Kumar Gala
  2010-12-02 20:21 ` Peter Tyser
  0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2010-12-01 12:49 UTC (permalink / raw)
  To: u-boot

We intended to use the PIC TFRR register however we where missing adding
in the PIC register base offset from IMMR when we defined
_POST_WORD_ADDR.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 include/post.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/post.h b/include/post.h
index 957ce3b..519cef1 100644
--- a/include/post.h
+++ b/include/post.h
@@ -58,11 +58,13 @@
 
 #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 \
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] powerpc/8xxx: Fix _POST_WORD_ADDR on 85xx & 86xx systems
  2010-12-01 12:49 [U-Boot] [PATCH] powerpc/8xxx: Fix _POST_WORD_ADDR on 85xx & 86xx systems Kumar Gala
@ 2010-12-02 20:21 ` Peter Tyser
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Tyser @ 2010-12-02 20:21 UTC (permalink / raw)
  To: u-boot

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

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-02 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01 12:49 [U-Boot] [PATCH] powerpc/8xxx: Fix _POST_WORD_ADDR on 85xx & 86xx systems Kumar Gala
2010-12-02 20:21 ` Peter Tyser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox