linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: David Brownell <david-b@pacbell.net>
Cc: me@felipebalbi.com, Felipe Balbi <felipe.balbi@nokia.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-usb@vger.kernel.org, linux-arch@vger.kernel.org,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: drivers/usb/musb/musb_io.h
Date: Sat, 16 Aug 2008 12:29:16 +0300	[thread overview]
Message-ID: <20080816092915.GD25069@frodo> (raw)
In-Reply-To: <200808151905.32383.david-b@pacbell.net>


[-- Attachment #1.1: Type: text/plain, Size: 1254 bytes --]

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

[-- Attachment #1.2: 0001-musb-io-only-define-read-write-stubs-if-they-re-not.diff --]
[-- Type: text/plain, Size: 1365 bytes --]

From e6df3ab0b49e5a52c0b0b089d38efba97dd2f870 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@nokia.com>
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@nokia.com>
---
 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 #2: Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2008-08-16  9:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080814215200.27f79a59.akpm@linux-foundation.org>
     [not found] ` <20080815073750.GG16231@frodo>
     [not found]   ` <20080815074318.GH16231@frodo>
     [not found]     ` <20080815010227.121e5e4b.akpm@linux-foundation.org>
     [not found]       ` <20080815081154.GJ16231@frodo>
2008-08-15  8:31         ` drivers/usb/musb/musb_io.h Andrew Morton
     [not found]           ` <20080815013148.b9dfc7ad.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-08-15  8:52             ` drivers/usb/musb/musb_io.h Felipe Balbi
2008-08-15  8:52               ` drivers/usb/musb/musb_io.h Felipe Balbi
2008-08-15  9:11               ` drivers/usb/musb/musb_io.h Andrew Morton
2008-08-15  9:11                 ` drivers/usb/musb/musb_io.h Andrew Morton
2008-08-15  9:23                 ` drivers/usb/musb/musb_io.h Felipe Balbi
     [not found]                 ` <20080815021131.dfab416a.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-08-15 11:53                   ` drivers/usb/musb/musb_io.h Russell King
2008-08-15 11:53                     ` drivers/usb/musb/musb_io.h Russell King
     [not found]                     ` <20080815115308.GA24513-f404yB8NqCZvn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2008-08-15 12:38                       ` drivers/usb/musb/musb_io.h Felipe Balbi
2008-08-15 12:38                         ` drivers/usb/musb/musb_io.h Felipe Balbi
2008-08-15 13:17                         ` drivers/usb/musb/musb_io.h Felipe Balbi
2008-08-15 13:17                           ` drivers/usb/musb/musb_io.h Felipe Balbi
2008-08-18  6:40                           ` drivers/usb/musb/musb_io.h Geert Uytterhoeven
2008-08-15 21:46                         ` drivers/usb/musb/musb_io.h David Brownell
2008-08-15 22:22                           ` drivers/usb/musb/musb_io.h Felipe Balbi
2008-08-16  1:53                             ` drivers/usb/musb/musb_io.h David Brownell
2008-08-16  1:53                               ` drivers/usb/musb/musb_io.h David Brownell
2008-08-16  2:05                               ` drivers/usb/musb/musb_io.h David Brownell
2008-08-16  9:29                                 ` Felipe Balbi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080816092915.GD25069@frodo \
    --to=me@felipebalbi.com \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=felipe.balbi@nokia.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).