summaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-01-30 15:27:26 +0100
committerMichal Simek <michal.simek@xilinx.com>2014-02-10 07:42:03 +0100
commit4f3cbd79afd99cc5143b2beb126e7425af7f1ff9 (patch)
treee3609f0bcb8f918d6e2548a987081fb131faf072 /arch/microblaze
parentac1566ece497b2a37667cc5d4258edb0bf3b6836 (diff)
downloadop-kernel-dev-4f3cbd79afd99cc5143b2beb126e7425af7f1ff9.zip
op-kernel-dev-4f3cbd79afd99cc5143b2beb126e7425af7f1ff9.tar.gz
microblaze: Define readq and writeq IO helper function
Some drivers check if readq/writeq functions are defined. If not internal driver functions are used which cause compilation failures. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/include/asm/io.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h
index a2cea72..3fbb7f1 100644
--- a/arch/microblaze/include/asm/io.h
+++ b/arch/microblaze/include/asm/io.h
@@ -89,6 +89,11 @@ static inline unsigned int readl(const volatile void __iomem *addr)
{
return le32_to_cpu(*(volatile unsigned int __force *)addr);
}
+#define readq readq
+static inline u64 readq(const volatile void __iomem *addr)
+{
+ return le64_to_cpu(__raw_readq(addr));
+}
static inline void writeb(unsigned char v, volatile void __iomem *addr)
{
*(volatile unsigned char __force *)addr = v;
@@ -101,6 +106,7 @@ static inline void writel(unsigned int v, volatile void __iomem *addr)
{
*(volatile unsigned int __force *)addr = cpu_to_le32(v);
}
+#define writeq(b, addr) __raw_writeq(cpu_to_le64(b), addr)
/* ioread and iowrite variants. thease are for now same as __raw_
* variants of accessors. we might check for endianess in the feature
OpenPOWER on IntegriCloud