[RFC] Handling of errors for AMD NOR (cfi_cmdset_0002) chips

Artem Bityutskiy dedekind1 at gmail.com
Thu Mar 24 03:55:23 EDT 2011


On Thu, 2011-03-24 at 08:45 +0100, Alexander Stein wrote:
> Hello,
> 
> On Friday 11 March 2011, 02:42:59 Ilya Yanok wrote:
> > current cfi_cmdset_0002.c code does not implement handling of error
> > statuses reported by the chip during write/erase and just waits for a
> > software timeout instead.
> > 
> > We think that proper handling of these conditions could help us to debug
> > the issue we have with the NOR flash and UBIFS so we'd like to implement
> > such handling.
> > 
> > I've tried to do this, please see my initial patch below. For now errors
> > are just reported via pr_debug().
> > 
> > I'd like to hear any comments. Am I doing things right or not? Maybe I'm
> > missing something?
> 
> I'm not that much into these cfi commands, but does this status check address 
> immediate finished flash erases?
> Let me explain: We have a NOR-Flash partition used for UBIFS. We noticed 
> ubiformat takes about 11 minutes to format it (~100MiB). In u-boot ubi create 
> takes about 2 _seconds_ iff the partition has been erased before.
> If the flash hasn't been erased before it takes about the same time.
> It seems u-boot can detect if the flash is already ready after invoking a 
> erase command on an empty sector while linux doesn't.
> I once checked the erase/format time for 1 sector in ubiformat:
> non-empty sector: ~1s
> empty-sector:    0.5s

That's just question of improving ubiformat a bit.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list