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

Commit 1feb2a31 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: gsi: add 1ms delay before reset



As part of GSI reset workaround, a 1ms sleep needs to be added
between the first reset command and the second one.

Change-Id: I6131aa646edfd6192e4f0895a7cc97728d6f7536
CRs-Fixed: 1079245
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 5c4400be
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/msm_gsi.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include "gsi.h"
#include "gsi_reg.h"

@@ -26,6 +27,8 @@
#define GSI_MHI_ER_START 10
#define GSI_MHI_ER_END 16

#define GSI_RESET_WA_MIN_SLEEP 1000
#define GSI_RESET_WA_MAX_SLEEP 2000
static const struct of_device_id msm_gsi_match[] = {
	{ .compatible = "qcom,msm_gsi", },
	{ },
@@ -1982,6 +1985,7 @@ int gsi_reset_channel(unsigned long chan_hdl)

	/* workaround: reset GSI producers again */
	if (ctx->props.dir == GSI_CHAN_DIR_FROM_GSI && !reset_done) {
		usleep_range(GSI_RESET_WA_MIN_SLEEP, GSI_RESET_WA_MAX_SLEEP);
		reset_done = true;
		goto reset;
	}