[U-Boot] [PATCH V3] lcd: align bmp header when uncopmressing image
Wolfgang Denk
wd at denx.de
Tue Jun 4 17:05:58 CEST 2013
Dear Piotr Wilczek,
In message <1370343625-16596-1-git-send-email-p.wilczek at samsung.com> you wrote:
> When compressed image is loaded, it must be decompressed
> to an aligned address + 2 to avoid unaligned access exception
> on some ARM platforms.
...
> + /* align to 32-bit-aligned-address + 2 */
> + if ((unsigned int)bmp % 4 != 2)
> + bmp = (bmp_image_t *)((((unsigned int)dst + 1) & ~3) + 2);
Please drop the "if()" - it is not necessary and just adds to the code
size.
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
Never underestimate the bandwidth of a station wagon full of tapes.
-- Dr. Warren Jackson, Director, UTCS
More information about the U-Boot
mailing list