Intel flash that powers up locked

Konstantin Kletschke lists at
Wed Jun 1 09:41:30 EDT 2005

Hi there!

I have intel K3 devices on my Board and the linux Kernel needs to unlock
I found
and incorporated the provided diff into a daily-mtd-cvs snapshot from
20050530 in 2.6.11.
However, this code Oopses in cfi_intelext_unlockall():

static void cfi_intelext_unlockall(struct mtd_info *mtd)
#if 1
        int i;
        for (i = 0; i <= mtd->numeraseregions; i++) {
                printk("mtd->numeraseregions %x\n", mtd->numeraseregions);
                int j;
                printk("mtd->eraseregions[0].numblocks %x\n", 

The printk("mtd->eraseregions[0].numblocks %x\n", 

causes The Oops. How is that possible?
Also weird is that mtd->numeraseregions is 0.

Probing scb9328_flash at physical address 0x10000000 (16-bit buswidth)
scb9328_flash: Found 1 x16 devices at 0x0 in 16-bit bank              
 Intel/Sharp Extended Query Table at 0x0031             
Using buffer write method                  
  Feature/Command Support:      01E6
     - Chip Erase:              unsupported
     - Suspend Erase:           supported  
     - Suspend Program:         supported
     - Legacy Lock/Unlock:      unsupported
     - Queued Erase:            unsupported
     - Instant block lock:      supported  
     - Protection Bits:         supported
     - Page-mode read:          supported
     - Synchronous read:        supported
     - Simultaneous operations: unsupported
  Supported functions after Suspend: 01    
     - Program after Erase Suspend: supported
  Block Status Register Mask: 0007           
     - Lock Bit Active:      yes  
     - Valid Bit Active:     yes
     - Unknown Bit 2 Active: yes
  Vcc Logic Supply Optimum Program/Erase Voltage: 3.3 V
cfi_cmdset_0001: Erase suspend on write enabled        
number of CFI chips: 1                         
devsize              16777216
5 cmdlinepart partitions found on MTD device scb9328_flash
Creating 5 MTD partitions on "scb9328_flash":             
0x00000000-0x00020000 : "U-boot"             
0x00020000-0x00040000 : "U-boot_env"
mtd->numeraseregions 0              
Unable to handle kernel NULL pointer dereference at virtual address 00000008

After that I tried another approach like that in message 
so the for loop went away in a replacement for the oneliner which calls
cfi_intelext_unlock(). This function is called and Oopses at
cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
                ofs, len, 0);

What can be the cause of that?
Has anybody Intel K3 unlocking working and if yes, how is his or her map
driver looking?

Regards, konsti

More information about the linux-mtd mailing list