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

Commit e091b01a authored by Cheng Zeng's avatar Cheng Zeng
Browse files

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: default avatarCheng Zeng <quic_chenzeng@quicinc.com>
parent 93c0b93b
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1752,7 +1752,14 @@ 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 gsi_readl(gsi_ctx->base + GSI_EE_n_EV_CH_k_CNTXT_4_OFFS(id, ee));
	uint64_t rp;

	rp = gsi_readl(gsi_ctx->base +
		GSI_EE_n_EV_CH_k_CNTXT_4_OFFS(id, ee));
	rp |= ((uint64_t)gsi_readl(gsi_ctx->base +
		GSI_EE_n_EV_CH_k_CNTXT_5_OFFS(id, ee))) << 32;

	return rp;
}

int gsi_alloc_evt_ring(struct gsi_evt_ring_props *props, unsigned long dev_hdl,