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

Commit e1ce24d1 authored by Suresh Vankadara's avatar Suresh Vankadara Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: icp: Add write barrier in hfi command write



Add write barrier in hfi command write to make sure
data is ready for firmware to process.

Change-Id: Iba1f7b02c5bcd98dc6e280f4eb2873a7d31ed845
Signed-off-by: default avatarSuresh Vankadara <svankada@codeaurora.org>
parent a418fe22
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -109,7 +109,19 @@ int hfi_write_cmd(void *cmd_ptr)
			new_write_idx << BYTE_WORD_SHIFT);
	}

	/*
	 * To make sure command data in a command queue before
	 * updating write index
	 */
	wmb();

	q->qhdr_write_idx = new_write_idx;

	/*
	 * Before raising interrupt make sure command data is ready for
	 * firmware to process
	 */
	wmb();
	cam_io_w((uint32_t)INTR_ENABLE,
		g_hfi->csr_base + HFI_REG_A5_CSR_HOST2ICPINT);
err: