Faster flash_eraseall for NOR flash

Øyvind Harboe oyvind.harboe at zylin.com
Tue Dec 14 10:09:33 EST 2010


Hi Mike,

thanks for the feedback!

>> I've added an option to skip already erased CFI blocks. This
>> includes checking if the JFFS2 cleanmarker is written.
>
> i dont think -f/--fast is the right name.  how about something a bit
> more explicit like --skip-erased ?

Sounds good to me.

> why cant this also be used for NAND ?  all the NAND devices i use have
> 0xff when erased.

I don't have any NAND to test with, nor am I terribly familiar with
NAND.

I think it would be good to limit this patch to NOR flash that I
can actually test and know something about. Also NAND flash
doesn't have the horrible erase performance issues, so it
might not be worth it from the point of view that it adds a new
code path.

Will it be acceptable to limit this patch to NOR flash and
pass the buck on NAND flash to someone
more familiar with NAND flash, who can test it and knows
whether or not it makes much sense?

> other random problems:
>  - the coding style of this patch is incorrect.  please review the
> style found in the rest of the file.  such as brace placement and
> spaces in function calls.

I did make an effort to follow the style, so any mismatch with
the existing style is just because I'm white-space blind. Much
like color blindness, it happens when you see enough different
formatting rules. The most annoying is of course code that
doesn't follow any rules, so I'll see about getting this fixed.

>  - your patch is not against the master branch -- there is no
> "flash_eraseall.c" file anymore.

k.

>  - once you update, your code will look vastly different as there are
> helpers to do memory allocation/error output/etc...

k.

>  - better to use pread() rather than lseek()/read().

Didn't know that one. Looks nice though!



-- 
Øyvind Harboe

Can Zylin Consulting help on your project?

US toll free 1-866-980-3434 / International +47 51 63 25 00

http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer



More information about the linux-mtd mailing list