From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sutter Date: Thu, 14 Nov 2013 13:12:33 +0100 Subject: [U-Boot] [U-Boot,PATCHv4] Optimized nand_read_buf for kirkwood In-Reply-To: <20131114013102.GA12213@home.buserror.net> References: <1377519056-25364-1-git-send-email-phil.sutter@viprinet.com> <20131114013102.GA12213@home.buserror.net> Message-ID: <20131114121233.GA403@philter.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Scott, On Wed, Nov 13, 2013 at 07:31:02PM -0600, Scott Wood wrote: > On Mon, Aug 26, 2013 at 02:10:56PM +0200, Phil Sutter wrote: > > From: Nico Erfurth > > > > The basic idea is taken from the linux-kernel, but further optimized. > > > > First align the buffer to 8 bytes, then use ldrd/strd to read and store > > in 8 byte quantities, then do the final bytes. > > > > Tested using: 'date ; nand read.raw 0xE00000 0x0 0x10000 ; date'. > > Without this patch, NAND read of 132MB took 49s (~2.69MB/s). With this > > patch in place, reading the same amount of data was done in 27s > > (~4.89MB/s). So read performance is increased by ~80%! > > > > Signed-off-by: Nico Erfurth > > Tested-by: Phil Sutter > > Cc: Prafulla Wadaskar > > > > --- > > Changed since V3: > > - fixed author > > --- > > drivers/mtd/nand/kirkwood_nand.c | 32 ++++++++++++++++++++++++++++++++ > > 1 file changed, 32 insertions(+) > > I tried to build-test this, and I couldn't find any board that defines > CONFIG_NAND_KIRKWOOD. > > The patch that removed it was commit > b5befd8211b54ae2d2fca3fbed061c879951ceaa ("arm/km: fix u-boot.kwb build > breakage"), over two years ago. It's not clear whether the removal was > intentional. > > What target did you use to test this? I tested using a custom board with Marvell Kirkwood SoC, but e.g. the Marvell OpenRD Ultimate should be fine. Best wishes, Phil Sutter Software Engineer -- Viprinet Europe GmbH Mainzer Str. 43 55411 Bingen am Rhein Germany Phone/Zentrale: +49 6721 49030-0 Direct line/Durchwahl: +49 6721 49030-134 Fax: +49 6721 49030-109 phil.sutter at viprinet.com http://www.viprinet.com Registered office/Sitz der Gesellschaft: Bingen am Rhein, Germany Commercial register/Handelsregister: Amtsgericht Mainz HRB44090 CEO/Gesch?ftsf?hrer: Simon Kissel