]> git.dujemihanovic.xyz Git - u-boot.git/commit
cfi_flash: Fix unaligned accesses to cfi_qry structure
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>
Tue, 14 May 2013 17:27:52 +0000 (12:27 -0500)
committerStefan Roese <sr@denx.de>
Thu, 23 May 2013 07:47:59 +0000 (09:47 +0200)
commitaedadf10f0eac3084105511062520b0b361dd9bf
tree3401bdcd36c707b0969d068cca3d0a990eee31f7
parent8bcb6f43e98ffc76e998349e0ec32a0e359160d4
cfi_flash: Fix unaligned accesses to cfi_qry structure

Packed structure cfi_qry contains unaligned 16- and 32-bits members,
accessing which causes problems when cfi_flash driver is compiled with
-munaligned-access option: flash initialization hangs, probably
due to data error.

Since the structure is supposed to replicate the actual data layout
in CFI Flash chips, the alignment issue can't be fixed in the structure.
So, unaligned fields need using of explicit unaligned access macros.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Reviewed-By: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/mtd/cfi_flash.c
include/mtd/cfi_flash.h