From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 17 Jun 2009 17:04:15 -0500 Subject: [U-Boot] PATCH: bugfix for nand erase failure with bad blocks In-Reply-To: <4A391724.2080207@valueteam.com> References: <4A3798C4.8000303@valueteam.com> <20090616181035.52228832E416@gemini.denx.de> <4A37F7BF.2090101@valueteam.com> <20090616200940.DD093832E416@gemini.denx.de> <4A37FE47.3030203@freescale.com> <4A3898B5.8060309@valueteam.com> <4A389EE9.1000005@valueteam.com> <20090617155421.GB6333@loki.buserror.net> <4A391724.2080207@valueteam.com> Message-ID: <4A39685F.6030304@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Michele De Candia (VT) wrote: >> I'm a little uneasy about changing the normal erase command from size >> to end >> -- it would break existing uses. Though, it would make it consistent >> with >> the NOR erase command. Perhaps a period where it warns but accepts >> anyway a >> size, if the second parameter is less than the first. >> > > This doesn't work always: for example, when you erase at the NAND begin, > second parameter could be greater than first one. Hmm... perhaps check the alignment? If "end" is supposed to be the last to-be-erased byte, not the first not-to-be-erased byte, then if the low bits are 0 it's a size (and gets a warning) and if they're 1 it's an end? Or just always use the new syntax, announce it loudly, and grep the board config files for scripts to update. Or leave it alone and only change the plus variant. :-) > It can always warn user when he uses the first erase way. Then what would be the correct, non-warning-producing way to erase a region of flash regardless of its bad block content? -Scott