armv7: add reset timeout to identify_nand_chip
authorLadislav Michl <ladis@linux-mips.org>
Tue, 12 Jul 2016 18:28:15 +0000 (20:28 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 22 Jul 2016 13:53:00 +0000 (09:53 -0400)
commitb1509e3a4aa55b003e814386dd83972858544e55
treefadcc44edc93bda36df47aea7504e56188a79038
parent431889d6ad9a39846636716478d504aa7ff976fc
armv7: add reset timeout to identify_nand_chip

identify_nand_chip hangs forever in loop when NAND is not present.
As IGEPv2 comes either with NAND or OneNAND flash, add reset timeout
to let function fail gracefully allowing caller to know NAND is
not present. On NAND equipped board, reset succeeds on first read,
so 1000 loops seems to be safe timeout.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
arch/arm/cpu/armv7/omap3/spl_id_nand.c
arch/arm/include/asm/arch-omap3/sys_proto.h