diff options
author | Wolfgang Denk <wd@denx.de> | 2009-09-11 11:15:31 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-09-15 00:13:15 +0200 |
commit | 97138fc48091f2b063c4e32f36d05854b9d113fb (patch) | |
tree | 89e33dd59720c643143dda382ca2336e514cc117 /board/esd | |
parent | ba73060cf4163bd5eb1711020126e2f7f62d363e (diff) | |
download | bootable_bootloader_goldelico_gta04-97138fc48091f2b063c4e32f36d05854b9d113fb.zip bootable_bootloader_goldelico_gta04-97138fc48091f2b063c4e32f36d05854b9d113fb.tar.gz bootable_bootloader_goldelico_gta04-97138fc48091f2b063c4e32f36d05854b9d113fb.tar.bz2 |
board/esd/cpci750/ide.c: fix compile warning
Fix warning: ide.c:54: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/esd')
-rw-r--r-- | board/esd/cpci750/ide.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/board/esd/cpci750/ide.c b/board/esd/cpci750/ide.c index 638219f..a3bd1b7 100644 --- a/board/esd/cpci750/ide.c +++ b/board/esd/cpci750/ide.c @@ -48,14 +48,18 @@ int ide_preinit (void) if (devbusfn == -1) devbusfn = pci_find_device (0x1095, 0x3114, 0); if (devbusfn != -1) { + ulong *ide_bus_offset_ptr; + status = 0; + ide_bus_offset_ptr = &ide_bus_offset[0]; pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0, - (u32 *) & ide_bus_offset[0]); + (u32 *)ide_bus_offset_ptr); ide_bus_offset[0] &= 0xfffffffe; ide_bus_offset[0] += CONFIG_SYS_PCI0_IO_SPACE; + ide_bus_offset_ptr = &ide_bus_offset[1]; pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_2, - (u32 *) & ide_bus_offset[1]); + (u32 *)ide_bus_offset_ptr); ide_bus_offset[1] &= 0xfffffffe; ide_bus_offset[1] += CONFIG_SYS_PCI0_IO_SPACE; } |