]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c
authorMarek Vasut <marex@denx.de>
Fri, 27 Jul 2012 22:57:12 +0000 (00:57 +0200)
committerWolfgang Denk <wd@denx.de>
Mon, 30 Jul 2012 07:58:02 +0000 (09:58 +0200)
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>
arch/powerpc/cpu/mpc8xx/cpu.c

index 5cbf9a688eda0c01d2980b0655509f924cc96778..b3fcfe5626a5e1cb5aadfa16e1acd39c64726a1f 100644 (file)
@@ -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) {