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

Unverified Commit b2ca3bdd authored by Subhransu S. Prusty's avatar Subhransu S. Prusty Committed by Mark Brown
Browse files

ASoC: Intel: Skylake: Remove second shim read in register_poll



No need to read the register again if the value read has already matched
the target during the loop. So remove the second shim read.

Signed-off-by: default avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: default avatarGuneshwor Singh <guneshwor.o.singh@intel.com>
Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 187c43df
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
	 */

	timeout = jiffies + msecs_to_jiffies(time);
	while (((sst_dsp_shim_read_unlocked(ctx, offset) & mask) != target)
	while ((((reg = sst_dsp_shim_read_unlocked(ctx, offset)) & mask) != target)
		&& time_before(jiffies, timeout)) {
		k++;
		if (k > 10)
@@ -278,8 +278,6 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
		usleep_range(s, 2*s);
	}

	reg = sst_dsp_shim_read_unlocked(ctx, offset);

	if ((reg & mask) == target) {
		dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s successful\n",
					reg, operation);