linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: khc@pm.waw.pl (Krzysztof Halasa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro.
Date: Sun, 15 Nov 2009 00:05:05 +0100	[thread overview]
Message-ID: <m3zl6owvvi.fsf@intrepid.localdomain> (raw)

Define HAVE_IOREAD_AND_IOWRITE macro to indicate that the architecture has its
own set of ioread*() and iowrite*() routines and doesn't need the generic one
in arch/arm/include/asm/io.h.

Previously the ioread8 existence was tested, but it may be a function instead
of a macro (I want to get rid of IXP4xx ioread*/iowrite* macros).

Comments?

Signed-off-by: Krzysztof Ha?asa <khc@pm.waw.pl>

--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -236,7 +236,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
 /*
  * io{read,write}{8,16,32} macros
  */
-#ifndef ioread8
+#ifndef HAVE_IOREAD_AND_IOWRITE
 #define ioread8(p)	({ unsigned int __v = __raw_readb(p); __v; })
 #define ioread16(p)	({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __v; })
 #define ioread32(p)	({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __v; })
--- a/arch/arm/mach-ixp2000/include/mach/io.h
+++ b/arch/arm/mach-ixp2000/include/mach/io.h
@@ -123,6 +123,8 @@
 		}						\
 	})
 
+#define HAVE_IOREAD_AND_IOWRITE
+
 #define ioport_map(port, nr)	___io(port)
 
 #define ioport_unmap(addr)
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -553,6 +553,8 @@ __ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count)
 #define	iowrite16_rep(p, v, c)		__ixp4xx_iowrite16_rep(p, v, c)
 #define	iowrite32_rep(p, v, c)		__ixp4xx_iowrite32_rep(p, v, c)
 
+#define HAVE_IOREAD_AND_IOWRITE
+
 #define	ioport_map(port, nr)		((void __iomem*)(port + PIO_OFFSET))
 #define	ioport_unmap(addr)
 #endif	// !CONFIG_PCI

             reply	other threads:[~2009-11-14 23:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14 23:05 Krzysztof Halasa [this message]
2009-11-14 23:33 ` IXP4xx: Drop "__ixp4xx_" prefix from in/out/ioread/iowrite functions for clarity. Re: (to fool the list server) Krzysztof Halasa
2009-11-14 23:43 ` IXP4xx: Rename indirect MMIO primitives from __ixp4xx_* to __indirect_*. Re: nothing Krzysztof Halasa
2009-11-28 18:24 ` [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro Russell King - ARM Linux
2009-11-28 20:12   ` Krzysztof Halasa
2009-11-28 20:25     ` Russell King - ARM Linux
2009-11-28 20:47       ` Krzysztof Halasa

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=m3zl6owvvi.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=linux-arm-kernel@lists.infradead.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).