mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
drivers: rpmsg: rpm-smd: define readq_relaxed for ARM variants
ARM cannot natively read 64-bit address. As such the readq_ variants are not defined for this architecture. Add a 32-bit equivalent to read 2 sequential 4-byte memory into a u64 value. Let's keep them locally defined for now, since they are not native to the ARM architecture. Change-Id: I9d00d0a9cd185e658d7b860cac2f59c8438e1b30 Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
This commit is contained in:
parent
5f551b3328
commit
e90ef046a6
2 changed files with 19 additions and 1 deletions
|
|
@ -72,6 +72,15 @@
|
|||
k = get_next_kvp(k))
|
||||
|
||||
|
||||
#ifdef CONFIG_ARM
|
||||
#define readq_relaxed(a) ({ \
|
||||
u64 val = readl_relaxed((a) + 4); \
|
||||
val <<= 32; \
|
||||
val |= readl_relaxed((a)); \
|
||||
val; \
|
||||
})
|
||||
#endif
|
||||
|
||||
/* Debug Definitions */
|
||||
enum {
|
||||
MSM_RPM_LOG_REQUEST_PRETTY = BIT(0),
|
||||
|
|
@ -1560,7 +1569,7 @@ static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev)
|
|||
int ret = 0;
|
||||
int irq;
|
||||
void __iomem *reg_base;
|
||||
uint32_t version = V0_PROTOCOL_VERSION; /* set to default v0 format */
|
||||
uint64_t version = V0_PROTOCOL_VERSION; /* set to default v0 format */
|
||||
|
||||
p = of_find_compatible_node(NULL, NULL, "qcom,rpm-smd");
|
||||
if (!p) {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,15 @@
|
|||
|
||||
#define GET_FIELD(a) ((strnstr(#a, ".", 80) + 1))
|
||||
|
||||
#ifdef CONFIG_ARM
|
||||
#define readq_relaxed(a) ({ \
|
||||
u64 val = readl_relaxed((a) + 4); \
|
||||
val <<= 32; \
|
||||
val |= readl_relaxed((a)); \
|
||||
val; \
|
||||
})
|
||||
#endif
|
||||
|
||||
struct msm_rpm_master_stats_platform_data {
|
||||
phys_addr_t phys_addr_base;
|
||||
u32 phys_size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue