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

Commit 4cfe1935 authored by Melody Olvera's avatar Melody Olvera
Browse files

drivers: soc: qcom: Check if readq_relaxed macro is defined



Two drivers define their own readq_relaxed macro. This is
redefined by the RTB to allow for register logging, so these
drivers must ensure it is not already defined before
overwriting it.

Change-Id: I81dcb29fdbe55b933ff74c24d879ac9361619a8c
Signed-off-by: default avatarMelody Olvera <molvera@codeaurora.org>
parent b20ec664
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
	(container_of(attr, struct ddr_stats_kobj_attr, ka)->pd)

#ifdef CONFIG_ARM
#ifndef readq_relaxed
#define readq_relaxed(a) ({			\
	u64 val = readl_relaxed((a) + 4);	\
	val <<= 32;				\
@@ -33,6 +34,7 @@
	val;					\
})
#endif
#endif

struct ddr_stats_platform_data {
	phys_addr_t phys_addr_base;
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <clocksource/arm_arch_timer.h>

#ifdef CONFIG_ARM
#ifndef readq_relaxed
#define readq_relaxed(a) ({			\
	u64 val = readl_relaxed((a) + 4);	\
	val <<= 32;				\
@@ -24,6 +25,7 @@
	val;					\
})
#endif
#endif

struct stats_config {
	u32 offset_addr;