linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
To: Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
Cc: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Felipe Balbi
	<felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Paul Mundt <lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
Subject: Re: drivers/usb/musb/musb_io.h
Date: Fri, 15 Aug 2008 16:17:09 +0300	[thread overview]
Message-ID: <20080815131708.GO16231@frodo> (raw)
In-Reply-To: <20080815123848.GN16231@frodo>

On Fri, Aug 15, 2008 at 03:38:49PM +0300, Felipe Balbi wrote:
> So I think until we have a better solution we'll need the attached patch
> to musb_io.h

Another possible solution would be the attached. I think this new
version is a bit better since we won't have to keep adding other
architectures when we find out they provide read/write friends.

=== cut here ===

From ee8f7e4150e54139613208043561be557f35e3b3 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
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.

Signed-off-by: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
---
 drivers/usb/musb/musb_io.h |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
index 6bbedae..222f5ab 100644
--- a/drivers/usb/musb/musb_io.h
+++ b/drivers/usb/musb/musb_io.h
@@ -37,21 +37,30 @@
 
 #include <linux/io.h>
 
-#ifndef	CONFIG_ARM
+#ifndef readsl
 static inline void readsl(const void __iomem *addr, void *buf, int len)
 	{ insl((unsigned long)addr, buf, len); }
+#endif
+#ifndef readsw
 static inline void readsw(const void __iomem *addr, void *buf, int len)
 	{ insw((unsigned long)addr, buf, len); }
+#endif
+#ifndef readsb
 static inline void readsb(const void __iomem *addr, void *buf, int len)
 	{ insb((unsigned long)addr, buf, len); }
+#endif
 
+#ifndef writesl
 static inline void writesl(const void __iomem *addr, const void *buf, int len)
 	{ outsl((unsigned long)addr, buf, len); }
+#endif
+#ifndef writesw
 static inline void writesw(const void __iomem *addr, const void *buf, int len)
 	{ outsw((unsigned long)addr, buf, len); }
+#endif
+#ifndef writesb
 static inline void writesb(const void __iomem *addr, const void *buf, int len)
 	{ outsb((unsigned long)addr, buf, len); }

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <me@felipebalbi.com>
To: Felipe Balbi <me@felipebalbi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Felipe Balbi <felipe.balbi@nokia.com>,
	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: Fri, 15 Aug 2008 16:17:09 +0300	[thread overview]
Message-ID: <20080815131708.GO16231@frodo> (raw)
Message-ID: <20080815131709.Sm3raxs1aKBNxtalK2nVU6puHDasoxq2FwII6HZVZ6A@z> (raw)
In-Reply-To: <20080815123848.GN16231@frodo>

On Fri, Aug 15, 2008 at 03:38:49PM +0300, Felipe Balbi wrote:
> So I think until we have a better solution we'll need the attached patch
> to musb_io.h

Another possible solution would be the attached. I think this new
version is a bit better since we won't have to keep adding other
architectures when we find out they provide read/write friends.

=== cut here ===

From ee8f7e4150e54139613208043561be557f35e3b3 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.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
 drivers/usb/musb/musb_io.h |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
index 6bbedae..222f5ab 100644
--- a/drivers/usb/musb/musb_io.h
+++ b/drivers/usb/musb/musb_io.h
@@ -37,21 +37,30 @@
 
 #include <linux/io.h>
 
-#ifndef	CONFIG_ARM
+#ifndef readsl
 static inline void readsl(const void __iomem *addr, void *buf, int len)
 	{ insl((unsigned long)addr, buf, len); }
+#endif
+#ifndef readsw
 static inline void readsw(const void __iomem *addr, void *buf, int len)
 	{ insw((unsigned long)addr, buf, len); }
+#endif
+#ifndef readsb
 static inline void readsb(const void __iomem *addr, void *buf, int len)
 	{ insb((unsigned long)addr, buf, len); }
+#endif
 
+#ifndef writesl
 static inline void writesl(const void __iomem *addr, const void *buf, int len)
 	{ outsl((unsigned long)addr, buf, len); }
+#endif
+#ifndef writesw
 static inline void writesw(const void __iomem *addr, const void *buf, int len)
 	{ outsw((unsigned long)addr, buf, len); }
+#endif
+#ifndef writesb
 static inline void writesb(const void __iomem *addr, const void *buf, int len)
 	{ outsb((unsigned long)addr, buf, len); }
-
 #endif
 
 /* NOTE:  these offsets are all in bytes */
-- 
1.6.0.rc3.6.ga0653

-- 
balbi

  parent reply	other threads:[~2008-08-15 13:17 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                         ` Felipe Balbi [this message]
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                                 ` drivers/usb/musb/musb_io.h Felipe Balbi

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=20080815131708.GO16231@frodo \
    --to=me-uirdbs8odbtmtblb0cgj/q@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org \
    --cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).