aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8260/commproc.c
diff options
context:
space:
mode:
authorScott Wood2013-05-17 20:01:54 -0500
committerWolfgang Denk2013-06-11 22:01:45 +0200
commita166fbca20e40937bf37cc18c389f68e995c1821 (patch)
treeca90c9999014f7172aefabf257c9c0d2533aecf4 /arch/powerpc/cpu/mpc8260/commproc.c
parente1208c2fe5e07f9a248cfbf9bbb212aa34ad2806 (diff)
powerpc: fix 8xx and 82xx type-punning warnings with GCC 4.7
C99's strict aliasing rules are insane to use in low-level code such as a bootloader, but as Wolfgang has rejected -fno-strict-aliasing in the past, add a union so that 16-bit accesses can be performed. Compile-tested only. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/powerpc/cpu/mpc8260/commproc.c')
-rw-r--r--arch/powerpc/cpu/mpc8260/commproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/mpc8260/commproc.c b/arch/powerpc/cpu/mpc8260/commproc.c
index 22cef3e9839..484bd177451 100644
--- a/arch/powerpc/cpu/mpc8260/commproc.c
+++ b/arch/powerpc/cpu/mpc8260/commproc.c
@@ -43,7 +43,7 @@ m8260_cpm_reset(void)
} while ((immr->im_cpm.cp_cpcr & CPM_CR_FLG) && ++count < 1000000);
#ifdef CONFIG_HARD_I2C
- *((unsigned short*)(&immr->im_dprambase[PROFF_I2C_BASE])) = 0;
+ immr->im_dprambase16[PROFF_I2C_BASE / sizeof(u16)] = 0;
#endif
}