linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro.
@ 2009-11-14 23:05 Krzysztof Halasa
  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
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Krzysztof Halasa @ 2009-11-14 23:05 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-28 20:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-14 23:05 [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro Krzysztof Halasa
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

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).