[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1430979572-14768-8-git-send-email-heikki.krogerus@linux.intel.com>
Date: Thu, 7 May 2015 09:19:27 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Felipe Balbi <balbi@...com>
Cc: David Cohen <david.a.cohen@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Stephen Boyd <sboyd@...eaurora.org>,
Baolu Lu <baolu.lu@...ux.intel.com>,
Paul Bolle <pebolle@...cali.nl>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [̈́PATCHv4 07/12] usb: dwc3: setup phys earlier
This allows dwc3_phy_setup() to be more useful later. There
is nothing preventing the PHY configuration registers from
being programmed early. They do not loose their context in
soft reset.
There are however other PHY related operations that should
be executed before the driver request handles to the PHYs,
such as registering DWC3's ULPI interface, which can now be
done in dwc3_phy_setup().
Also, if there ever was need for the two 100ms delays in
dwc3_phy_setup() there isn't anymore. The PHYs are now reset
after the PHY interfaces are setup.
Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Acked-by: David Cohen <david.a.cohen@...ux.intel.com>
---
drivers/usb/dwc3/core.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 921f181..6b02e12 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -436,8 +436,6 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
- mdelay(100);
-
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
/*
@@ -453,8 +451,6 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
-
- mdelay(100);
}
/**
@@ -569,8 +565,6 @@ static int dwc3_core_init(struct dwc3 *dwc)
dwc3_writel(dwc->regs, DWC3_GCTL, reg);
- dwc3_phy_setup(dwc);
-
ret = dwc3_alloc_scratch_buffers(dwc);
if (ret)
goto err1;
@@ -892,6 +886,8 @@ static int dwc3_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, dwc);
dwc3_cache_hwparams(dwc);
+ dwc3_phy_setup(dwc);
+
ret = dwc3_core_get_phy(dwc);
if (ret)
goto err0;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists