Starting with synopsis version 220A the command to wake up the
host changed from 0x3 to 0x7. The code is fixed accordingly.
The problem that was seen is that upon MBIM function
suspend, a remote wakeup from the IPA side wouldn't
wake up the host, and at some point a stall in the IPA would be
seen.
CRs-fixed: 695414
Change-Id: I6ef5c649f263f388a1cc92a3db71c14c741b5b71
Signed-off-by: Lena Salman <esalman@codeaurora.org>
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
#define DWC3_DGCMD_SET_LMP 0x01
#define DWC3_DGCMD_SET_PERIODIC_PAR 0x02
#define DWC3_DGCMD_XMIT_FUNCTION 0x03
+#define DWC3_DGCMD_XMIT_DEV 0x07
/* These apply for core versions 1.94a and later */
#define DWC3_DGCMD_SET_SCRATCHPAD_ADDR_LO 0x04
return -EAGAIN;
}
- ret = dwc3_send_gadget_generic_command(dwc,
- DWC3_DGCMD_XMIT_FUNCTION, interface_id);
+ if (dwc->revision < DWC3_REVISION_220A) {
+ ret = dwc3_send_gadget_generic_command(dwc,
+ DWC3_DGCMD_XMIT_FUNCTION, interface_id);
+ } else {
+ ret = dwc3_send_gadget_generic_command(dwc,
+ DWC3_DGCMD_XMIT_DEV, 0x1 | (interface_id << 4));
+ }
if (ret)
pr_err("Function wakeup HW command failed.\n");