summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-07-28 00:57:12 +0200
committerWolfgang Denk <wd@denx.de>2012-07-30 09:58:02 +0200
commit15ae8a31ca5d3860b0957edec4fca373daff6bb5 (patch)
tree26c24f5074825eb97b25176c3ed6e8e5e2baf837 /arch/powerpc
parent702e6014f15b307f144fa03ecaf83a8446c6802a (diff)
downloadu-boot-imx-15ae8a31ca5d3860b0957edec4fca373daff6bb5.zip
u-boot-imx-15ae8a31ca5d3860b0957edec4fca373daff6bb5.tar.gz
u-boot-imx-15ae8a31ca5d3860b0957edec4fca373daff6bb5.tar.bz2
MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c
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 <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Subject slightly changed. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested on TQM855MDCBAB7-T66.102 (MPC855T at 66 MHz) and TQM860LDB0A3-T50.202 (MPC860T at 50MHz). Tested-by: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/cpu/mpc8xx/cpu.c3
1 files changed, 2 insertions, 1 deletions
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) {