Intel flash that powers up locked

Todd Poynor tpoynor at
Thu Jun 2 19:31:12 EDT 2005

Konstantin Kletschke wrote:
> However, this code Oopses in cfi_intelext_unlockall():
> Creating 5 MTD partitions on "scb9328_flash":             
> 0x00000000-0x00020000 : "U-boot"             
> 0x00020000-0x00040000 : "U-boot_env"
> mtd->numeraseregions 0              
> rumms                 
> Unable to handle kernel NULL pointer dereference at virtual address 00000008

I'll hazard a guess that you're calling the function passing the 
partition "slave" mtd structure instead of the "master" mtd structure 
created at chip probe time (since you're passing the partition creation 
stage instead of doing this at chip probe time).  See the mtdpart.c code 
for the mapping between the two kinds of structures, such as 
part_unlock(), which passes the master structure.  Only the master 
structure has various fields properly filled out, especially things 
determined by the chip driver, and numeraseregions doesn't seem to be 
copied from master to slave after a quick glance.

If that's a bad guess then sorry for the misdirection. ;)  Let us know 
how you are calling the unlock function to take some of the guesswork 
out of it.


More information about the linux-mtd mailing list