Эх сурвалжийг харах

msm: gsi: Read 64-bit ring RP value from registers

The DMA address allocated may be in 64-bit address
range if dma mask is set to 64-bit, the MSB register
value is required.

Signed-off-by: Cheng Zeng <[email protected]>

Change-Id: Ie091b01ac44e70d450a8d050855b5f3f0f510695
Cheng Zeng 3 жил өмнө
parent
commit
4c160e8d20

+ 6 - 1
drivers/platform/msm/gsi/gsi.c

@@ -2101,7 +2101,12 @@ static inline uint64_t gsi_read_event_ring_rp_ddr(struct gsi_evt_ring_props* pro
 static inline uint64_t gsi_read_event_ring_rp_reg(struct gsi_evt_ring_props* props,
 	uint8_t id, int ee)
 {
-	return gsihal_read_reg_nk(GSI_EE_n_EV_CH_k_CNTXT_4, ee, id);
+	uint64_t rp;
+
+	rp = gsihal_read_reg_nk(GSI_EE_n_EV_CH_k_CNTXT_4, ee, id);
+	rp |= ((uint64_t)gsihal_read_reg_nk(GSI_EE_n_EV_CH_k_CNTXT_5, ee, id)) << 32;
+
+	return rp;
 }
 
 static int __gsi_pair_msi(struct gsi_evt_ctx *ctx,