/* Write 'BSA, BSC' of DataRAM */
value = onenand_buffer_address(dataram, sectors, count);
this->write_word(value, this->base + ONENAND_REG_START_BUFFER);
-
+
if (readcmd) {
/* Select DataRAM for DDP */
value = onenand_bufferram_address(this, block);
* onenand_check_bufferram - [GENERIC] Check BufferRAM information
* @param mtd MTD data structure
* @param addr address to check
- * @return 1 if there are valid data, otherwise 0
+ * @return 1 if there are valid data, otherwise 0
*
* Check bufferram if there is data we required
*/
struct onenand_chip *this = mtd->priv;
int block, page;
int i;
-
+
block = (int) (addr >> this->erase_shift);
page = (int) (addr >> this->page_shift);
page &= this->page_mask;
struct onenand_chip *this = mtd->priv;
int block, page;
int i;
-
+
block = (int) (addr >> this->erase_shift);
page = (int) (addr >> this->page_shift);
page &= this->page_mask;
if (memcmp(dataram0, dataram1, mtd->oobblock))
return -EBADMSG;
-
+
return 0;
}
#else
onenand_release_device(mtd);
*retlen = written;
-
+
return ret;
}
onenand_release_device(mtd);
*retlen = written;
-
+
return 0;
}
onenand_get_device(mtd, FL_WRITING);
/* TODO handling oob */
-
+
/* Loop until all keve's data has been written */
len = 0;
while (count) {
pbuf = buffer;
- /*
+ /*
* If the given tuple is >= pagesize then
* write it out from the iov
*/
if (!(status & ONENAND_WP_US))
printk(KERN_ERR "block = %d, wp status = 0x%x\n", block, status);
}
-
+
return 0;
}
printk(KERN_INFO "Lock scheme is Continues Lock\n");
this->options |= ONENAND_CONT_LOCK;
}
-
+
return 0;
}
}
memcpy(&mtd->oobinfo, this->autooob, sizeof(mtd->oobinfo));
-
+
/* Fill in remaining MTD driver data */
mtd->type = MTD_NANDFLASH;
mtd->flags = MTD_CAP_NANDFLASH | MTD_ECC;