[MTD] OneNAND: release CPU in cycles

This patch teaches OneNAND to release processor in
read/write/erase cycles and let other processes proceed.
Also, remove buggi touch watchdog call which only hides
the problem instead of solving it.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

authored by Artem Bityutskiy and committed by Artem Bityutskiy 61a7e198 60d84f97

+9 -7
+9 -7
drivers/mtd/onenand/onenand_base.c
··· 310 311 if (state != FL_READING) 312 cond_resched(); 313 - touch_softlockup_watchdog(); 314 } 315 /* To get correct interrupt status in timeout case */ 316 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); ··· 366 { 367 struct onenand_chip *this = mtd->priv; 368 369 - /* To prevent soft lockup */ 370 - touch_softlockup_watchdog(); 371 - 372 wait_for_completion(&this->complete); 373 374 return onenand_wait(mtd, state); ··· 385 386 /* We use interrupt wait first */ 387 this->wait = onenand_interrupt_wait; 388 - 389 - /* To prevent soft lockup */ 390 - touch_softlockup_watchdog(); 391 392 timeout = msecs_to_jiffies(100); 393 remain = wait_for_completion_timeout(&this->complete, timeout); ··· 727 728 stats = mtd->ecc_stats; 729 while (read < len) { 730 thislen = min_t(int, mtd->writesize, len - read); 731 732 column = from & (mtd->writesize - 1); ··· 810 column = from & (mtd->oobsize - 1); 811 812 while (read < len) { 813 thislen = mtd->oobsize - column; 814 thislen = min_t(int, thislen, len); 815 ··· 986 int thislen = min_t(int, bytes, len - written); 987 u_char *wbuf = (u_char *) buf; 988 989 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, bytes); 990 991 /* Partial page write */ ··· 1073 /* Loop until all data write */ 1074 while (written < len) { 1075 int thislen = min_t(int, mtd->oobsize, len - written); 1076 1077 column = to & (mtd->oobsize - 1); 1078 ··· 1203 instr->state = MTD_ERASING; 1204 1205 while (len) { 1206 1207 /* Check if we have a bad block, we do not erase bad blocks */ 1208 if (onenand_block_checkbad(mtd, addr, 0, 0)) {
··· 310 311 if (state != FL_READING) 312 cond_resched(); 313 } 314 /* To get correct interrupt status in timeout case */ 315 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); ··· 367 { 368 struct onenand_chip *this = mtd->priv; 369 370 wait_for_completion(&this->complete); 371 372 return onenand_wait(mtd, state); ··· 389 390 /* We use interrupt wait first */ 391 this->wait = onenand_interrupt_wait; 392 393 timeout = msecs_to_jiffies(100); 394 remain = wait_for_completion_timeout(&this->complete, timeout); ··· 734 735 stats = mtd->ecc_stats; 736 while (read < len) { 737 + cond_resched(); 738 + 739 thislen = min_t(int, mtd->writesize, len - read); 740 741 column = from & (mtd->writesize - 1); ··· 815 column = from & (mtd->oobsize - 1); 816 817 while (read < len) { 818 + cond_resched(); 819 + 820 thislen = mtd->oobsize - column; 821 thislen = min_t(int, thislen, len); 822 ··· 989 int thislen = min_t(int, bytes, len - written); 990 u_char *wbuf = (u_char *) buf; 991 992 + cond_resched(); 993 + 994 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, bytes); 995 996 /* Partial page write */ ··· 1074 /* Loop until all data write */ 1075 while (written < len) { 1076 int thislen = min_t(int, mtd->oobsize, len - written); 1077 + 1078 + cond_resched(); 1079 1080 column = to & (mtd->oobsize - 1); 1081 ··· 1202 instr->state = MTD_ERASING; 1203 1204 while (len) { 1205 + cond_resched(); 1206 1207 /* Check if we have a bad block, we do not erase bad blocks */ 1208 if (onenand_block_checkbad(mtd, addr, 0, 0)) {