The error mesage is  "nand_erase: Unaligned address";
 
 
Change Like this:
 
 __u32 addr;
 if(dev->inbandTags) {
  addr =
     ((loff_t) blockNumber) * dev->totalBytesPerChunk
  * dev->nChunksPerBlock;
 }
 else {
  addr =
     ((loff_t) blockNumber) * dev->nDataBytesPerChunk
  * dev->nChunksPerBlock;
 }
 
 
 

if(dev->inbandTags){

  ei.len = dev->totalBytesPerChunk * dev->nChunksPerBlock;
 
 }
 else {
 ei.len = dev->nDataBytesPerChunk * dev->nChunksPerBlock;
 }

 

Is there someone else found this problem