Re: [PATCH v16 9/9] usb: dwc3: qcom: Add multiport suspend/resume support for wrapper

From: Krishna Kurapati PSSNV
Date: Mon Mar 25 2024 - 11:40:27 EST




On 3/25/2024 6:22 PM, Johan Hovold wrote:
On Thu, Mar 07, 2024 at 11:50:52AM +0530, Krishna Kurapati wrote:
Power event IRQ is used for wakeup in cases:
a) where the controller is super speed capable and missing an
ss_phy interrupt.
b) where the GIC is not capable of detecting DP/DM hs phy irq's.

Power event IRQ stat register indicates whether high speed phy
entered and exited L2 successfully during suspend and resume.
Indicate the same for all ports of multiport.

Signed-off-by: Krishna Kurapati <quic_kriskura@xxxxxxxxxxx>

@@ -471,9 +480,12 @@ static int dwc3_qcom_resume(struct dwc3_qcom *qcom, bool wakeup)
if (ret)
dev_warn(qcom->dev, "failed to enable interconnect: %d\n", ret);
+ for (i = 0; i < qcom->num_ports; i++) {
/* Clear existing events from PHY related to L2 in/out */

This comment either needs to be moved above the for-loop or be indented
one level in.

Ah yes, missed it.
Will move it out of the loop.


- dwc3_qcom_setbits(qcom->qscratch_base, PWR_EVNT_IRQ_STAT_REG,
- PWR_EVNT_LPM_IN_L2_MASK | PWR_EVNT_LPM_OUT_L2_MASK);
+ dwc3_qcom_setbits(qcom->qscratch_base,
+ pwr_evnt_irq_stat_reg[i],
+ PWR_EVNT_LPM_IN_L2_MASK | PWR_EVNT_LPM_OUT_L2_MASK);
+ }
qcom->is_suspended = false;

With the above fixed:

Reviewed-by: Johan Hovold <johan+linaro@xxxxxxxxxx>

Thanks for the review.

Regards,
Krishna,