From: Roger Quadros Date: Mon, 23 Feb 2015 15:26:39 +0000 (+0200) Subject: mtd: nand: Prevent possible kernel lockup in nand_command() X-Git-Tag: omap-for-v4.1/fixes-rc1~47^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60c70d66cdd39eb560bba5a95c429bf2ad5294d0;p=pandora-kernel.git mtd: nand: Prevent possible kernel lockup in nand_command() If a NAND device is not really present or pin muxes are not correctly configured we can lock up the kernel waiting infinitely for NAND_STATUS to be ready. This can be easily reproduced on TI's DRA7-evm board by booting it without NAND support in u-boot and disabling NAND pin muxes in the kernel. Add timeout when waiting for NAND_CMD_RESET completion. As per ONFi v4.0 tRST can be upto 250ms for EZ-NAND and 5ms for raw NAND. Signed-off-by: Roger Quadros Tested-by: Nishanth Menon Signed-off-by: Brian Norris --- Reading git-diff-tree failed