Skip to content

Commit 4f3cbd7

Browse files
author
Michal Simek
committed
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 <[email protected]>
1 parent ac1566e commit 4f3cbd7

File tree

1 file changed

+6
-0
lines changed
  • arch/microblaze/include/asm

1 file changed

+6
-0
lines changed

arch/microblaze/include/asm/io.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ static inline unsigned int readl(const volatile void __iomem *addr)
8989
{
9090
return le32_to_cpu(*(volatile unsigned int __force *)addr);
9191
}
92+
#define readq readq
93+
static inline u64 readq(const volatile void __iomem *addr)
94+
{
95+
return le64_to_cpu(__raw_readq(addr));
96+
}
9297
static inline void writeb(unsigned char v, volatile void __iomem *addr)
9398
{
9499
*(volatile unsigned char __force *)addr = v;
@@ -101,6 +106,7 @@ static inline void writel(unsigned int v, volatile void __iomem *addr)
101106
{
102107
*(volatile unsigned int __force *)addr = cpu_to_le32(v);
103108
}
109+
#define writeq(b, addr) __raw_writeq(cpu_to_le64(b), addr)
104110

105111
/* ioread and iowrite variants. thease are for now same as __raw_
106112
* variants of accessors. we might check for endianess in the feature

0 commit comments

Comments
 (0)