[U-Boot] [PATCH] drivers:lcd: fix unaligned access on lcd

Piotr Wilczek p.wilczek at samsung.com
Mon May 27 13:35:15 CEST 2013


Dear Wolfgang Denk,

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de]
> Sent: Friday, May 24, 2013 8:33 PM
> To: Piotr Wilczek
> Cc: u-boot at lists.denx.de; Kyungmin Park
> Subject: Re: [U-Boot] [PATCH] drivers:lcd: fix unaligned access on lcd
> 
> Dear Piotr Wilczek,
> 
> In message <1369381565-13946-1-git-send-email-p.wilczek at samsung.com>
> you wrote:
> > This patch replace 'le32_to_cpu' function with 'get_unaligend_le32'
> to
> > avoid unaligned access exception on some ARM platforms (ex Trats2).
> 
> I think we've been discussng this before, and then decided to rather
> make sure that there will be no unaligned accesses because the header
> will be kept properly aligned.
> 
> What is your new use case that requires this?

My case is a bmp unzipped to a 4-byte aligned address. The two signature bytes of the bmp header make the other fields 4-byte unaligned. We could force unzip the bmp to an aligned address + 2.

Is this a better solution?

> 
> Best regards,
> 
> Wolfgang Denk
> 
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> "Spock, did you see the looks on their faces?"
> "Yes, Captain, a sort of vacant contentment."

Best regards,
Piotr Wilczek





More information about the U-Boot mailing list