From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Mack Date: Fri, 19 Dec 2014 17:31:34 +0100 Subject: [U-Boot] [PATCH v2 1/2] mtd: OMAP: Enable GPMC prefetch mode In-Reply-To: <20141219162757.GA23740@fox> References: <1403700213-16114-1-git-send-email-zonque@gmail.com> <1403700213-16114-2-git-send-email-zonque@gmail.com> <20141219162757.GA23740@fox> Message-ID: <549452E6.3010803@zonque.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Guido, thanks for your feedback! On 12/19/2014 05:27 PM, Guido Mart?nez wrote: >> +/** >> + * omap_prefetch_enable - configures and starts prefetch transfer >> + * @fifo_th: fifo threshold to be used for read/ write >> + * @count: number of bytes to be transferred >> + * @is_write: prefetch read(0) or write post(1) mode >> + */ >> +static int omap_prefetch_enable(int fifo_th, unsigned int count, int is_write) >> +{ >> + uint32_t val; >> + >> + if (fifo_th > PREFETCH_FIFOTHRESHOLD_MAX) >> + return -EINVAL; >> + >> + if (readl(&gpmc_cfg->prefetch_control)) >> + return -EBUSY; >> + >> + /* Set the amount of bytes to be prefetched */ >> + writel(count, &gpmc_cfg->prefetch_config2); >> + >> + val = (cs << PREFETCH_CONFIG1_CS_SHIFT) | (is_write & 1) | > On a current U-boot "cs" doesn't exist. I think you might want to pass a > "struct omap_nand_info *" and use info->cs. > > I fixed this last bit, and tested it. It results in 2.5x speed > improvements on a Micron NAND. So, thanks :) ! > > If you resend, you have my Reviewed-by and Tested-by. That's great to hear. However, I'm not currently working on this project, so I don't have a chance to respin the patch. In case any of the maintainers is interested, I guess that's easy enough to tweak on the fly when merging the patch :) Thanks, Daniel