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

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

usb: xhci-msm-hsic: Fix bug in mxhci_hsic_ulpi_write()



GUSB2PHYACC_VSTSDONE register clears when ulpi phy write
request is initiated. mxhci_hsic_ulpi_write() needs to poll
for GUSB2PHYACC_VSTSDONE to get set instead of clear to finish
successful phy write operation.

Change-Id: I93c78ecfe5938e03a19dd8bc50da81b55926239a
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent f76541ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -335,7 +335,7 @@ static int mxhci_hsic_ulpi_write(struct mxhci_hsic_hcd *mxhci, u32 val,

	/* poll for write done */
	timeout = jiffies + usecs_to_jiffies(ULPI_IO_TIMEOUT_USECS);
	while (readl_relaxed(MSM_HSIC_GUSB2PHYACC) & GUSB2PHYACC_VSTSDONE) {
	while (!(readl_relaxed(MSM_HSIC_GUSB2PHYACC) & GUSB2PHYACC_VSTSDONE)) {
		if (time_after(jiffies, timeout)) {
			dev_err(mxhci->dev, "mxhci_hsic_ulpi_write: timeout\n");
			return -ETIMEDOUT;