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

Commit efbfeb88 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: xhci-msm:hsic: Do not poll root hub after bus suspend



Root hub polling timer is not stopped after bus is
suspended. If timer expires after controller suspend this
causes un-clocked access to portsc register. Hence stop
root hub polling after bus suspend and start polling after
controller resume.

CRs-Fixed: 589141
Change-Id: Ic6006679cf90f92220339a9338cc5cf58ebc8f72
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 589022a4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -599,6 +599,10 @@ static int mxhci_hsic_suspend(struct mxhci_hsic_hcd *mxhci)

	init_completion(&mxhci->phy_in_lpm);

	/* Don't poll the roothubs after bus suspend. */
	clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
	del_timer_sync(&hcd->rh_timer);

	clk_disable_unprepare(mxhci->core_clk);
	clk_disable_unprepare(mxhci->utmi_clk);
	clk_disable_unprepare(mxhci->hsic_clk);
@@ -684,6 +688,10 @@ static int mxhci_hsic_resume(struct mxhci_hsic_hcd *mxhci)
	clk_prepare_enable(mxhci->utmi_clk);
	clk_prepare_enable(mxhci->core_clk);

	/* Re-enable port polling. */
	set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
	usb_hcd_poll_rh_status(hcd);

	if (mxhci->wakeup_irq)
		usb_hcd_resume_root_hub(hcd);