]> Pileus Git - ~andy/linux/commitdiff
arm64: Define readq and writeq for driver module using
authorChen Gang <gang.chen@asianux.com>
Fri, 19 Apr 2013 11:24:37 +0000 (12:24 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 19 Apr 2013 12:57:46 +0000 (13:57 +0100)
when compiling with allmodconfig, CONFIG_64BIT=y the file
drivers/base/regmap/regmap-mmio.c will use readq and writeq so we need
implement these functions.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/io.h

index 57f12c991de2e51fd2faa99f972824322489dfb7..2e12258aa7e47c110729c25265cfa6cae50e99c9 100644 (file)
@@ -92,10 +92,12 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
 #define readb_relaxed(c)       ({ u8  __v = __raw_readb(c); __v; })
 #define readw_relaxed(c)       ({ u16 __v = le16_to_cpu((__force __le16)__raw_readw(c)); __v; })
 #define readl_relaxed(c)       ({ u32 __v = le32_to_cpu((__force __le32)__raw_readl(c)); __v; })
+#define readq_relaxed(c)       ({ u64 __v = le64_to_cpu((__force __le64)__raw_readq(c)); __v; })
 
 #define writeb_relaxed(v,c)    ((void)__raw_writeb((v),(c)))
 #define writew_relaxed(v,c)    ((void)__raw_writew((__force u16)cpu_to_le16(v),(c)))
 #define writel_relaxed(v,c)    ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))
+#define writeq_relaxed(v,c)    ((void)__raw_writeq((__force u64)cpu_to_le64(v),(c)))
 
 /*
  * I/O memory access primitives. Reads are ordered relative to any
@@ -105,10 +107,12 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
 #define readb(c)               ({ u8  __v = readb_relaxed(c); __iormb(); __v; })
 #define readw(c)               ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
 #define readl(c)               ({ u32 __v = readl_relaxed(c); __iormb(); __v; })
+#define readq(c)               ({ u64 __v = readq_relaxed(c); __iormb(); __v; })
 
 #define writeb(v,c)            ({ __iowmb(); writeb_relaxed((v),(c)); })
 #define writew(v,c)            ({ __iowmb(); writew_relaxed((v),(c)); })
 #define writel(v,c)            ({ __iowmb(); writel_relaxed((v),(c)); })
+#define writeq(v,c)            ({ __iowmb(); writeq_relaxed((v),(c)); })
 
 /*
  *  I/O port access primitives.