int blockpage, found = 0;
unsigned int i;
-#if defined(CONFIG_S3C64XX) || defined(CONFIG_S5PC100)
- return 0;
-#endif
-
if (ONENAND_IS_2PLANE(this))
blockpage = onenand_get_2x_blockpage(mtd, addr);
else
while (!ret) {
/* If there is more to load then start next load */
from += thislen;
+
+ if (this->options & ONENAND_DISABLE_READ_WHILE_LOAD)
+ goto skip_read_while_load;
+
if (read + thislen < len) {
this->command(mtd, ONENAND_CMD_READ, from, writesize);
/*
boundary = 0;
ONENAND_SET_PREV_BUFFERRAM(this);
}
-
+skip_read_while_load:
/* While load is going, read from last bufferRAM */
this->read_bufferram(mtd, from - thislen, ONENAND_DATARAM, buf, column, thislen);
/* Set up for next read from bufferRAM */
if (unlikely(boundary))
this->write_word(ONENAND_DDP_CHIP1, this->base + ONENAND_REG_START_ADDRESS2);
- ONENAND_SET_NEXT_BUFFERRAM(this);
+ if (this->options & ONENAND_DISABLE_READ_WHILE_LOAD)
+ this->command(mtd, ONENAND_CMD_READ, from, writesize);
+ else
+ ONENAND_SET_NEXT_BUFFERRAM(this);
buf += thislen;
thislen = min_t(int, writesize, len - read);
column = 0;
#define ONENAND_HAS_UNLOCK_ALL (0x0002)
#define ONENAND_HAS_2PLANE (0x0004)
#define ONENAND_RUNTIME_BADBLOCK_CHECK (0x0200)
+#define ONENAND_DISABLE_READ_WHILE_LOAD (0x0400)
#define ONENAND_PAGEBUF_ALLOC (0x1000)
#define ONENAND_OOBBUF_ALLOC (0x2000)