From: Timur Tabi <timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
Bjorn Andersson
<bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
"Ivan T. Ivanov"
<iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>,
Andy Gross <agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Jack Pham <jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Greg Kroah-Hartman <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Philip Elcan <pelcan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Mark Langsdorf <mlangsdo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Jon Masters <jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 4/5] [v2] usb: host: ehci-msm: Fix register initialization
Date: Thu, 10 Dec 2015 18:28:56 -0600 [thread overview]
Message-ID: <1449793737-1816-4-git-send-email-timur@codeaurora.org> (raw)
In-Reply-To: <1449793737-1816-1-git-send-email-timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
From: Jack Pham <jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
The default value for the 'transceiver select' field of
the PORTSC register may not always be correct. Previously
the phy-msm-usb driver would do this for us, but since
ehci-msm can now be instantiated standalone without any PHY
driver, the register needs to be explicitly initialized to
ULPI mode to properly communicate with the PHY.
This is not readily apparent, as firmware or bootloader code
also happen to pre-initialize this for us. However, it can
manifest when performing a driver unbind/rebind as follows:
cd /sys/bus/platform/drivers/msm_hsusb_host
echo QCOM8040:00 > unbind
echo QCOM8040:00 > bind
The EHCI core executes a controller reset as part of this,
and as a result the register in question would revert to
its default state and must be re-initialized properly.
Furthermore this may be useful in the future when adding
PM suspend/resume support.
Signed-off-by: Jack Pham <jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Signed-off-by: Timur Tabi <timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
---
drivers/usb/host/ehci-msm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 102837e..b71947d 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -56,6 +56,8 @@ static int ehci_msm_reset(struct usb_hcd *hcd)
if (retval)
return retval;
+ /* select ULPI phy and clear other status/control bits in PORTSC */
+ writel(PORTSC_PTS_ULPI, USB_PORTSC);
/* bursts of unspecified length. */
writel(0, USB_AHBBURST);
/* Use the AHB transactor, allow posted data writes */
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-12-11 0:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 0:28 [PATCH 1/5] [v2] usb: host: ehci-msm: Allow LS devices to work Timur Tabi
2015-12-11 0:28 ` [PATCH 2/5] [v2] usb: host: ehci-msm: Remove dependency on OTG PHY Timur Tabi
[not found] ` <1449793737-1816-2-git-send-email-timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-12-11 21:32 ` Andy Gross
[not found] ` <1449793737-1816-1-git-send-email-timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-12-11 0:28 ` [PATCH 3/5] [v2] usb: host: ehci-msm: Add support for ACPI probing Timur Tabi
2015-12-11 21:33 ` Andy Gross
2015-12-11 0:28 ` Timur Tabi [this message]
2015-12-11 21:34 ` [PATCH 4/5] [v2] usb: host: ehci-msm: Fix register initialization Andy Gross
2015-12-11 0:28 ` [PATCH 5/5] [v2] usb: host: ehci-msm: Register usb shutdown function Timur Tabi
2015-12-11 21:34 ` Andy Gross
2016-01-06 20:20 ` [PATCH 1/5] [v2] usb: host: ehci-msm: Allow LS devices to work Timur Tabi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449793737-1816-4-git-send-email-timur@codeaurora.org \
--to=timur-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
--cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
--cc=iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org \
--cc=jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mlangsdo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=pelcan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).