On Fri, Aug 15, 2008 at 07:05:31PM -0700, David Brownell wrote: > On Friday 15 August 2008, David Brownell wrote: > > Someone commented that this is what caused creation of > > the mmio_insl() family of routines ... > > > > ... but I notice that at least on ARM (current primary home > > for this driver!) those calls don't end up using optimized > > code. Since those optimimzed loops are a *big* win in terms > > of performance -- using LDM/STM to burst memory acccess to/from > > registers -- I'd rather not go that way for now. > > Oh, and worth remembering: *WHEN* a clean solution for this > is available, it should be usable in the NAND code. And surely > in other places which sometimes need PIO access to a FIFO... > > I was surprised to see that 16% improvement in read performance > with an 8-bit NAND device, just by switching from code looking > like generic mmio_insb() over to __raw_readsb(). Better IMO to > have the faster code be what the NAND core uses by default, than > to need to modify every platform's NAND driver to do that. Sure, I'll have to keep an eye on what's going on include/linux/io.h Attached is a new patch, added also ppc since they also provide those read/write calls. -- balbi
From e6df3ab0b49e5a52c0b0b089d38efba97dd2f870 Mon Sep 17 00:00:00 2001 From: Felipe Balbi <felipe.balbi@xxxxxxxxx> Date: Fri, 15 Aug 2008 10:51:56 +0300 Subject: [PATCH] musb: io: only define read/write stubs if they're not defined yet For those archs which don't provide read/write friends we provide our own implementation so musb driver won't break compilation. This is temporary fix until a better solution comes from upstream. Idealy, <linux/io.h> would provide those calls if the architecture did not provide them yet. In that case being possible to remove all those stubs from musb_io.h Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> --- drivers/usb/musb/musb_io.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h index 6bbedae..223f0a5 100644 --- a/drivers/usb/musb/musb_io.h +++ b/drivers/usb/musb/musb_io.h @@ -37,7 +37,9 @@ #include <linux/io.h> -#ifndef CONFIG_ARM +#if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \ + && !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \ + && !defined(CONFIG_PPC64) static inline void readsl(const void __iomem *addr, void *buf, int len) { insl((unsigned long)addr, buf, len); } static inline void readsw(const void __iomem *addr, void *buf, int len) -- 1.6.0.rc3.10.g5a13c
Attachment:
pgpgDxqNeaH9A.pgp
Description: PGP signature