From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 23 May 2013 09:49:19 +0200 Subject: [U-Boot] [PATCH v2] cfi_flash: Fix unaligned accesses to cfi_qry structure In-Reply-To: <1368552472-12931-1-git-send-email-andrew_gabbasov@mentor.com> References: <1368552472-12931-1-git-send-email-andrew_gabbasov@mentor.com> Message-ID: <519DC9FF.8020202@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/14/2013 07:27 PM, Andrew Gabbasov wrote: > 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. Applied to u-boot-cfi-flash/master. Thanks, Stefan