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

Commit aae212f2 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa Committed by Hemant Kumar
Browse files

dwc3-msm: Block doorbell to GSI from USB wrapper



It is required to block doorbell to GSI to avoid USB wrapper
from ringing doorbell before queuing stop xfer command to GSI
endpoint as part of stopping controller. Otherwise USB wrapper
is accessing IPA doorbell register while clocks are off after
restarting USB controller. Hence fix it by blocking doorbell
to GSI for avoiding this issue before queueing endxfer command
to GSI endpoint.

Change-Id: If926386462423f60d5c2535d766b6cb9ba59ea6f
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 14d8c199
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -966,6 +966,7 @@ struct dwc3_scratchpad_array {
#define DWC3_GSI_EVT_BUF_SETUP			11
#define DWC3_GSI_EVT_BUF_CLEANUP		12
#define DWC3_GSI_EVT_BUF_FREE			13
#define DWC3_CONTROLLER_NOTIFY_CLEAR_DB		14

#define MAX_INTR_STATS				10

+6 −0
Original line number Diff line number Diff line
@@ -1987,6 +1987,12 @@ static void dwc3_msm_notify_event(struct dwc3 *dwc, unsigned int event,
	case DWC3_CONTROLLER_NOTIFY_DISABLE_UPDXFER:
		dwc3_msm_dbm_disable_updxfer(dwc, value);
		break;
	case DWC3_CONTROLLER_NOTIFY_CLEAR_DB:
		dev_dbg(mdwc->dev, "DWC3_CONTROLLER_NOTIFY_CLEAR_DB\n");
		dwc3_msm_write_reg_field(mdwc->base,
			GSI_GENERAL_CFG_REG(mdwc->gsi_reg[GENERAL_CFG_REG]),
			BLOCK_GSI_WR_GO_MASK, true);
		break;
	default:
		dev_dbg(mdwc->dev, "unknown dwc3 event\n");
		break;
+4 −0
Original line number Diff line number Diff line
@@ -854,6 +854,10 @@ static void dwc3_stop_active_transfers(struct dwc3 *dwc)
		if (!(dep->flags & DWC3_EP_ENABLED))
			continue;

		if (dep->endpoint.ep_type == EP_TYPE_GSI && dep->direction)
			dwc3_notify_event(dwc,
				DWC3_CONTROLLER_NOTIFY_CLEAR_DB, 0);

		dwc3_remove_requests(dwc, dep);
	}
}