Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad32423a authored by Melody Olvera's avatar Melody Olvera
Browse files

ARM: io: Add __raw_readq and __raw_writeq functions



Added definitions for __raw_readq and __raw_writeq. These are
necessary for the RTB macros to work correctly.

Change-Id: I14fc23d3c30fae26adf1ec554f70171a3f839a51
Signed-off-by: default avatarMelody Olvera <molvera@codeaurora.org>
parent 4cfe1935
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -96,6 +96,18 @@ static inline void __raw_writel(u32 val, volatile void __iomem *addr)
		     : : "Qo" (*(volatile u32 __force *)addr), "r" (val));
}

#define __raw_writeq __raw_writeq
static inline void __raw_writeq(u64 val, volatile void __iomem *addr)
{
	register u64 v asm ("r2");

	v = val;

	asm volatile("strd %1, %0"
		     : "+Qo" (*(volatile u64 __force *)addr)
		     : "r" (v));
}

#define __raw_readb __raw_readb
static inline u8 __raw_readb(const volatile void __iomem *addr)
{
@@ -116,6 +128,17 @@ static inline u32 __raw_readl(const volatile void __iomem *addr)
	return val;
}

#define __raw_readq __raw_readq
static inline u64 __raw_readq(const volatile void __iomem *addr)
{
	register u64 val asm ("r2");

	asm volatile("ldrd %1, %0"
		     : "+Qo" (*(volatile u64 __force *)addr),
		       "=r" (val));
	return val;
}

/*
 * Architecture ioremap implementation.
 */