mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
committed by
Wolfgang Denk
parent
e1208c2fe5
commit
a166fbca20
@@ -309,7 +309,8 @@ int idma_init (void)
|
||||
|
||||
memaddr = dpalloc (sizeof (pram_idma_t), 64);
|
||||
|
||||
*(volatile ushort *) &immap->im_dprambase[PROFF_IDMA2_BASE] = memaddr;
|
||||
*(volatile u16 *)&immap->im_dprambase16
|
||||
[PROFF_IDMA2_BASE / sizeof(u16)] = memaddr;
|
||||
piptr = (volatile pram_idma_t *) ((uint) (immap) + memaddr);
|
||||
|
||||
piptr->pi_resv1 = 0; /* manual says: clear it */
|
||||
|
Reference in New Issue
Block a user