Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1205688 authored by Ladislav Michl's avatar Ladislav Michl Committed by Boris Brezillon
Browse files

mtd: onenand: omap2: Account waiting time as waiting on IO



Use wait_for_completion_io_timeout, which has an impact on how the
task is accounted in scheduling stats.

Signed-off-by: default avatarLadislav Michl <ladis@linux-mips.org>
Reviewed-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: default avatarRoger Quadros <rogerq@ti.com>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent fafc0b3a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -170,9 +170,8 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
		if (result == 0) {
			int retry_cnt = 0;
retry:
			result = wait_for_completion_timeout(&c->irq_done,
						    msecs_to_jiffies(20));
			if (result == 0) {
			if (!wait_for_completion_io_timeout(&c->irq_done,
						msecs_to_jiffies(20))) {
				/* Timeout after 20ms */
				ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
				if (ctrl & ONENAND_CTRL_ONGO &&