dev->nReservedBlocks = 5;
dev->nShortOpCaches = (options.no_cache) ? 0 : 10;
dev->inbandTags = options.inband_tags;
-#if defined (CONFIG_ARCH_RK2818) || (CONFIG_ARCH_RK29)
- dev->inbandTags = 1;
-#endif
/* ... and the functions. */
if (yaffsVersion == 2) {
{
struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
__u32 addr =
- ((loff_t) blockNumber) * dev->totalBytesPerChunk
+ ((loff_t) blockNumber) * dev->nDataBytesPerChunk
* dev->nChunksPerBlock;
struct erase_info ei;
int retval = 0;
ei.mtd = mtd;
ei.addr = addr;
- ei.len = dev->totalBytesPerChunk * dev->nChunksPerBlock;
+ ei.len = dev->nDataBytesPerChunk * dev->nChunksPerBlock;
ei.time = 1000;
ei.retries = 2;
ei.callback = NULL;
if (localData)
yaffs_ReleaseTempBuffer(dev, data, __LINE__);
-#ifdef CONFIG_MTD_NAND_RK29
- //dxj 20101221@ if return -EBADMSG then i think the page is badchunk so just set the eccResult=YAFFS_ECC_RESULT_NO_ERROR
- if (tags && retval == -EBADMSG /*&& tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR*/) {
-#else
if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) {
-#endif
tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
dev->eccUnfixed++;
}