From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 17 Jul 2008 11:46:06 +0200 Subject: [U-Boot-Users] [PATCH v2] cfi_flash: fix flash on BE machines with CFG_WRITE_SWAPPED_DATA In-Reply-To: <20080716180449.GA20882@www.tglx.de> References: <20080715211240.GA16786@www.tglx.de> <20080715220521.08AC7240EE@gemini.denx.de> <20080716180449.GA20882@www.tglx.de> Message-ID: <200807171146.06555.sr@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 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 > Cc: Vasiliy Leonenko > Signed-off-by: Sebastian Siewior > --- > 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 =====================================================================