Re: [U-Boot] [PATCH V2] dm: ppc: Fixup cpu.c warning in mpc8xx

2012-07-30 Thread Wolfgang Denk
Dear Marek Vasut,

In message 1343429832-24194-1-git-send-email-ma...@denx.de you wrote:
 cpu.c: In function ‘check_CPU’:
 cpu.c:256:2: warning: dereferencing type-punned pointer will break 
 strict-aliasing rules [-Wstrict-aliasing]
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Wolfgang Denk w...@denx.de
 ---
  arch/powerpc/cpu/mpc8xx/cpu.c |3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 NOTE: This patch is likely to break something, it is only compile tested.
 NOTE2: Something is seriously wrong with my damned locale again :-/

Tested on TQM855MDCBAB7-T66.102 (MPC855T at 66 MHz) and
TQM860LDB0A3-T50.202 (MPC860T at 50MHz).

Tested-by: Wolfgang Denk w...@denx.de
Acked-by: Wolfgang Denk w...@denx.de


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Wish not to seem, but to be, the best.  - Aeschylus
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] dm: ppc: Fixup cpu.c warning in mpc8xx

2012-07-30 Thread Wolfgang Denk
Dear Marek Vasut,

In message 1343429832-24194-1-git-send-email-ma...@denx.de you wrote:
 cpu.c: In function ‘check_CPU’:
 cpu.c:256:2: warning: dereferencing type-punned pointer will break 
 strict-aliasing rules [-Wstrict-aliasing]
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Wolfgang Denk w...@denx.de
 ---
  arch/powerpc/cpu/mpc8xx/cpu.c |3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Applied to next branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Old programmers never die, they just branch to a new address.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V2] dm: ppc: Fixup cpu.c warning in mpc8xx

2012-07-27 Thread Marek Vasut
cpu.c: In function ‘check_CPU’:
cpu.c:256:2: warning: dereferencing type-punned pointer will break 
strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Marek Vasut ma...@denx.de
Cc: Wolfgang Denk w...@denx.de
---
 arch/powerpc/cpu/mpc8xx/cpu.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

NOTE: This patch is likely to break something, it is only compile tested.
NOTE2: Something is seriously wrong with my damned locale again :-/

diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 5cbf9a6..b3fcfe5 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -41,6 +41,7 @@
 #include netdev.h
 #include asm/cache.h
 #include linux/compiler.h
+#include asm/io.h
 
 #if defined(CONFIG_OF_LIBFDT)
 #include libfdt.h
@@ -253,7 +254,7 @@ static int check_CPU (long clock, uint pvr, uint immr)
if ((pvr  16) != 0x0050)
return -1;
 
-   k = (immr  16) | *((ushort *)  immap-im_cpm.cp_dparam[0xB0]);
+   k = (immr  16) | in_be16((ushort *)immap-im_cpm.cp_dparam[0xB0]);
m = 0;
 
switch (k) {
-- 
1.7.10.4

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