From: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
kishon-l0cyMroinI0@public.gmane.org,
stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
rogerq-l0cyMroinI0@public.gmane.org
Subject: [PATCH v2 12/12] USB: ehci-omap: Fix detection in HSIC mode
Date: Tue, 12 Mar 2013 13:09:00 +0200 [thread overview]
Message-ID: <1363086540-30567-1-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1363085090-24676-13-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
The HSIC devices need to be kept in reset while the EHCI controller
is being initialized and only brought out of reset after the
initialization is complete, else HSIC devices will not be detected.
Also remove outdated TODO list from header.
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
CC: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
---
drivers/usb/host/ehci-omap.c | 38 +++++++++++++++-----------------------
1 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 1ba1df8..dc2de47 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -29,12 +29,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * TODO (last updated Feb 27, 2010):
- * - add kernel-doc
- * - enable AUTOIDLE
- * - add suspend/resume
- * - add HSIC and TLL support
- * - convert to use hwmod and runtime PM
*/
#include <linux/kernel.h>
@@ -90,26 +84,13 @@ static inline u32 ehci_read(void __iomem *base, u32 reg)
static int omap_ehci_init(struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
- struct omap_hcd *omap = (struct omap_hcd *)ehci->priv;
- int rc, i;
-
- /* Hold PHYs in reset while initializing EHCI controller */
- for (i = 0; i < omap->nports; i++) {
- if (omap->phy[i])
- usb_phy_shutdown(omap->phy[i]);
- }
+ int rc;
/* we know this is the memory we want, no need to ioremap again */
ehci->caps = hcd->regs;
rc = ehci_setup(hcd);
- /* Bring PHYs out of reset */
- for (i = 0; i < omap->nports; i++) {
- if (omap->phy[i])
- usb_phy_init(omap->phy[i]);
- }
-
return rc;
}
@@ -219,9 +200,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
}
omap->phy[i] = phy;
- usb_phy_init(omap->phy[i]);
- /* bring PHY out of suspend */
- usb_phy_set_suspend(omap->phy[i], 0);
}
pm_runtime_enable(dev);
@@ -245,6 +223,20 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
goto err_pm_runtime;
}
+ /*
+ * Bring PHYs out of reset.
+ * Even though HSIC mode is a PHY-less mode, the reset
+ * line exists between the chips and can be modelled
+ * as a PHY device for reset control.
+ */
+ for (i = 0; i < omap->nports; i++) {
+ if (!omap->phy[i])
+ continue;
+
+ usb_phy_init(omap->phy[i]);
+ /* bring PHY out of suspend */
+ usb_phy_set_suspend(omap->phy[i], 0);
+ }
return 0;
--
1.7.4.1
next prev parent reply other threads:[~2013-03-12 11:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 10:44 [PATCH 00/12] USB: ehci-omap: Device tree support for 3.10 Roger Quadros
2013-03-12 10:44 ` [PATCH 02/12] USB: ehci-omap: Use devm_ioremap_resource() Roger Quadros
[not found] ` <1363085090-24676-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2013-03-12 10:44 ` [PATCH 01/12] USB: EHCI: split ehci-omap out to a separate driver Roger Quadros
2013-03-12 10:44 ` [PATCH 03/12] USB: ehci-omap: Use PHY APIs to get the PHY device and put it out of suspend Roger Quadros
2013-03-12 10:44 ` [PATCH 04/12] USB: ehci-omap: Remove PHY reset handling code Roger Quadros
2013-03-12 10:44 ` [PATCH 06/12] USB: ehci-omap: Select NOP USB transceiver driver Roger Quadros
2013-03-12 10:44 ` [PATCH 07/12] USB: ehci-omap: Get platform resources by index rather than by name Roger Quadros
2013-03-12 10:44 ` [PATCH 08/12] USB: ohci-omap3: " Roger Quadros
2013-03-12 10:44 ` [PATCH 05/12] USB: ehci-omap: Remove PHY regulator handling code Roger Quadros
2013-03-12 10:44 ` [PATCH 09/12] USB: ohci-omap3: Add device tree support and binding information Roger Quadros
2013-03-12 10:44 ` [PATCH 10/12] USB: ehci-omap: " Roger Quadros
2013-03-12 10:44 ` [PATCH 11/12] USB: ehci-omap: Try to get PHY even if not in PHY mode Roger Quadros
2013-03-12 15:57 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1303121155540.2153-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2013-03-14 14:08 ` Felipe Balbi
2013-03-14 15:08 ` Alan Stern
2013-03-12 10:44 ` [PATCH 12/12] USB: ehci-omap: Fix detection in HSIC mode Roger Quadros
[not found] ` <1363085090-24676-13-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2013-03-12 10:51 ` kishon
[not found] ` <513F089B.5080004-l0cyMroinI0@public.gmane.org>
2013-03-12 10:53 ` Roger Quadros
2013-03-12 11:09 ` Roger Quadros [this message]
2013-03-12 16:07 ` [PATCH v2 " Alan Stern
[not found] ` <Pine.LNX.4.44L0.1303121201050.2153-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2013-03-13 11:48 ` Roger Quadros
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=1363086540-30567-1-git-send-email-rogerq@ti.com \
--to=rogerq-l0cymroini0@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@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).