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