Skip to content
Commit 60c70d66 authored by Roger Quadros's avatar Roger Quadros Committed by Brian Norris
Browse files

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: default avatarRoger Quadros <rogerq@ti.com>
Tested-by: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 8cc7f33a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment