From ad32423a0ac652c3c9c6cb7b0cda84ab42479727 Mon Sep 17 00:00:00 2001 From: Melody Olvera Date: Wed, 7 Oct 2020 14:43:47 -0700 Subject: [PATCH 1/2] 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: Melody Olvera --- arch/arm/include/asm/io.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 7a0596fcb2e7..dc4d18ec0ba3 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -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. */ From 4fd9da8117379e1683b8dd34ebedafab4dc5bc96 Mon Sep 17 00:00:00 2001 From: Melody Olvera Date: Wed, 4 Nov 2020 12:20:28 -0800 Subject: [PATCH 2/2] defconfig: Enable RTB on sdxlemur Add configs to enable RTB on sdxlemur. Change-Id: I4839fc0cd1458f8fe5dbe499648fbe8fb0e9b86b Signed-off-by: Melody Olvera --- arch/arm/configs/vendor/sdxlemur-debug.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/vendor/sdxlemur-debug.config b/arch/arm/configs/vendor/sdxlemur-debug.config index 69670e8507fd..81e5b76b233b 100644 --- a/arch/arm/configs/vendor/sdxlemur-debug.config +++ b/arch/arm/configs/vendor/sdxlemur-debug.config @@ -49,3 +49,5 @@ CONFIG_VFAT_FS=y CONFIG_MHI_BUS=y CONFIG_MHI_DEBUG=y CONFIG_MHI_UCI=y +CONFIG_QCOM_RTB=y +CONFIG_QCOM_RTB_QGKI=y