[U-Boot-Users] [PATCH v2] cfi_flash: fix flash on BE machines with CFG_WRITE_SWAPPED_DATA

Stefan Roese sr at denx.de
Thu Jul 17 11:46:06 CEST 2008


On Wednesday 16 July 2008, Sebastian Siewior wrote:
> This got broken by commits 93c56f212c
>  [cfi_flash: support of long cmd in U-boot.]
>
> That command needs to be in little endian format on BE machines
> with CFG_WRITE_SWAPPED_DATA. Without this patch, the command 0xf0
> gets saved on stack as 0x00 00 00 f0 and 0x00 gets written into
> the cmdbuf in case portwidth = chipwidth = 8bit.
>
> Cc: Alexey Korolev <akorolev at infradead.org>
> Cc: Vasiliy Leonenko <vasiliy.leonenko at mail.ru>
> Signed-off-by: Sebastian Siewior <bigeasy at linutronix.de>
> ---
> I verified the results with
> http://download.breakpoint.cc/cfi-uboout-test.c
> and I get equal results with old / new method in four categories
> - BE & swapped data
> - BE & data now swapped
> - LE & swapped data
> - LE & data now swapped
> on x86 & powerpc

Now this looks better and actually works again on my BE platform.

Applied to u-boot-cfi-flash. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================




More information about the U-Boot mailing list