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

Commit 24113071 authored by Ankit Gupta's avatar Ankit Gupta
Browse files

i2c-msm-v2: initialize xfer mode structures in qup init



Unitialized blk mode structure cause crash when DMA gets disabled
from dt, forcing use of block mode for transfers > 64 bytes.
This patch initialize the xfer mode structures during the qup
intialization for all the xfer modes to avoid any unitialized access.

Change-Id: Ia2e44298948c8bbe15d751f9499cfd1c9b0ece4c
Signed-off-by: default avatarAnkit Gupta <ankgupta@codeaurora.org>
parent 9b4d473e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2888,6 +2888,11 @@ static int i2c_msm_qup_init(struct i2c_msm_ctrl *ctrl)
	if (ret)
		return ret;

	/* Initialize the xfer mode structures */
	i2c_msm_fifo_get_struct(ctrl);
	i2c_msm_blk_get_struct(ctrl);
	i2c_msm_bam_get_struct(ctrl);

	i2c_msm_qup_fifo_calc_size(ctrl);
	/*
	 * Ensure that QUP configuration is written and that fifo size if read