Commit 7533fca8 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Russell King
Browse files

[PATCH] ARM: 2747/1: allow platforms to provide their own iomap implementation

Patch from Lennert Buytenhek

This patch conditionalises the io{read,write}{8,16,32} defines and the
prototypes for ioport_map/ioport_unmap in asm-arm/io.h on ioread8 not
already having been defined.  This is done so that platforms can provide
their own implementation of the iomap API, ixp2000 for example needs
Signed-off-by: default avatarLennert Buytenhek <>
Signed-off-by: Deepak Saxena
Signed-off-by: default avatarRussell King <>
parent 79042f08
...@@ -275,6 +275,7 @@ extern void __iounmap(void __iomem *addr); ...@@ -275,6 +275,7 @@ extern void __iounmap(void __iomem *addr);
/* /*
* io{read,write}{8,16,32} macros * io{read,write}{8,16,32} macros
*/ */
#ifndef ioread8
#define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; }) #define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; })
#define ioread16(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(p)); __v; }) #define ioread16(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(p)); __v; })
#define ioread32(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(p)); __v; }) #define ioread32(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(p)); __v; })
...@@ -293,6 +294,7 @@ extern void __iounmap(void __iomem *addr); ...@@ -293,6 +294,7 @@ extern void __iounmap(void __iomem *addr);
extern void __iomem *ioport_map(unsigned long port, unsigned int nr); extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
extern void ioport_unmap(void __iomem *addr); extern void ioport_unmap(void __iomem *addr);
struct pci_dev; struct pci_dev;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment