From: Michael Schwingen Date: Mon, 18 Feb 2008 23:16:35 +0100 Subject: [U-Boot-Users] [patch] do not use cmd_reset uninitialized in cfi_flash.c In-Reply-To: <200802041705.10934.sr@denx.de> References: <200801282227.06426.vapier@gentoo.org> <200802041113.49729.sr@denx.de> <47A733C9.3030207@discworld.dascon.de> <200802041705.10934.sr@denx.de> Message-ID: <20080218221634.GA27687@discworld.dascon.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > > Right. But it will be an improvement to the current implementation, where a > random command is written as RESET command. And also an improvement to the > fixed AMD/Intel RESET command. So I vote for trying this solution. I'll test > on a few of mine platforms too. > > Michael, could please you provide a patch? Okay - sorry, I did not have time for as much testing as I planned. From a short test, it looks like AMD-style flash roms treat *any* unknown command write as a reset, at least when in CFI Query mode, so issuing the Intel reset command to AMD-style flashs seems safe (from the small sample I have), plus the 3-cycle magic sequence should kick the state machine into the right state even without a reset command. Since the AMD-style flashs require the unlock sequence for real operation, I chose to try the AMD reset command first, so that Intel flashs do no see an invalid command prior to the CFI query. I have tested the patch on AM29LV320-style flashs from Fujitsu and Macronix, plus Intel StrataFlash. cu Michael