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

Commit 091090e8 authored by Dhoat Harpal's avatar Dhoat Harpal
Browse files

soc: qcom: glink_smem_native_xport: Add readback to write index



Writing data to DDR is not ensured to be completed even with addition
of data memory barrier. It is possible that CPU receive that write
instruction is completed but in reality data can be stuck in intermediate
buffer.

Readback of write index is added to ensure that remote side is sent
interrupt only after data is written on DDR.

CRs-Fixed: 2136645
Change-Id: I32c4967daf71991621b57421167e0ac8d38ce065
Signed-off-by: default avatarDhoat Harpal <hdhoat@codeaurora.org>
parent 1fe630ed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -225,6 +225,7 @@ struct edge_info {
	spinlock_t rt_vote_lock;
	uint32_t rt_votes;
	uint32_t num_pw_states;
	uint32_t readback;
	unsigned long *ramp_time_us;
	struct mailbox_config_info *mailbox;
};
@@ -269,6 +270,7 @@ static void send_irq(struct edge_info *einfo)
	 * Any data associated with this event must be visable to the remote
	 * before the interrupt is triggered
	 */
	einfo->readback = einfo->tx_ch_desc->write_index;
	wmb();
	writel_relaxed(einfo->out_irq_mask, einfo->out_irq_reg);
	einfo->tx_irq_count++;