From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Thompson Date: Tue, 01 Dec 2009 11:34:43 +0000 Subject: [U-Boot] [PATCH RFC] NAND: Improve read performance from Large Page NAND devices In-Reply-To: <4B14EC4D.9090208@gefanuc.com> References: <4B0D37D2.1060401@gefanuc.com> <4B14697F.7020802@freescale.com> <4B14EC4D.9090208@gefanuc.com> Message-ID: <4B14FF53.5040208@gefanuc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/12/09 10:13, Nick Thompson wrote: > On 01/12/09 00:55, Scott Wood wrote: >> This change will break drivers that support large page and use the >> default read_page functions, but do not implement cmd_ctrl (they replace >> cmdfunc instead). This includes fsl_elbc_nand, mxc_nand, and >> mpc5121_nfc. While I'd like to move them to implementing their own >> read_page-type functions instead of cmdfunc, is there any way to make it >> a smoother transition? > > Yes, as it stands they would need modifying simultaneously and I have no > way to test such a change myself. The only required change in cmdfunc is > not to wait after a read0 request. You maybe in a better position to decide > if this has wider repercussions, but I will take a look at the above > drivers as well. [This is the main reason I made this an RFC]. How about, if nand_wait_cache_load was replaceable (by a no-op in your case) and the pre-fetch optimisation could be disabled by setting rstate to (INIT | NO_REQ) on every page read function call #ifdef CONFIG_NAND_NO_PREFETCH_READS? This leaves a problem with NAND_CMD_RNDOUT which is used by oob_first page reads but not supported by fsl_elbc_cmdfunc. I expect you don't use oob_first though..? I believe this would allow you to restore the original sequences and keep you going until you can define your own page read functions. [BTW these changes applied quite cleanly to my Linux tree and give similar performance gains there as well. If we can reach agreement here, I will make patches for Linux as well. Unfortunately, my tree is 2.6.18 with backported NAND support from 2.6.32rc1, but I can deal with that.] Nick.