From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 04 Feb 2009 13:54:02 -0600 Subject: [U-Boot] [PATCH] nand_base: Add timeout for NAND reset command In-Reply-To: <1233776842-23379-1-git-send-email-ptyser@xes-inc.com> References: <1233776842-23379-1-git-send-email-ptyser@xes-inc.com> Message-ID: <4989F25A.6090400@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Peter Tyser wrote: > +/* > + * CONFIG_SYS_NAND_RESET_CNT is used as a timeout mechanism when resetting > + * a flash. NAND flash is initialized prior to interrupts so standard timers > + * can't be used. CONFIG_SYS_NAND_RESET_CNT should be set to a value > + * which is greater than (max NAND reset time / NAND status read time). > + * A conservative default of 200000 (500 us / 25 ns) is used as a default. > + */ > +#ifndef CONFIG_SYS_NAND_RESET_CNT > +#define CONFIG_SYS_NAND_RESET_CNT 200000 > +#endif Where does 25 ns come from? Should the timeout be in terms of real time rather than iterations (we use get_ticks() for this purpose in fsl_elbc_nand.c)? -Scott