From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753960AbbBMWFK (ORCPT ); Fri, 13 Feb 2015 17:05:10 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:58514 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752758AbbBMWFI (ORCPT ); Fri, 13 Feb 2015 17:05:08 -0500 Date: Fri, 13 Feb 2015 16:04:56 -0600 From: Felipe Balbi To: David Cohen CC: Heikki Krogerus , Felipe Balbi , Greg Kroah-Hartman , Baolu Lu , , Subject: Re: [PATCH 6/8] usb: dwc3: add ULPI interface support Message-ID: <20150213220456.GL26980@saruman.tx.rr.com> Reply-To: References: <1422025978-178336-1-git-send-email-heikki.krogerus@linux.intel.com> <1422025978-178336-7-git-send-email-heikki.krogerus@linux.intel.com> <20150211193419.GA28788@psi-dev26.jf.intel.com> <20150212121214.GA18860@kuha.fi.intel.com> <20150213014130.GC21337@psi-dev26.jf.intel.com> <20150213131640.GC27695@kuha.fi.intel.com> <20150213220345.GB25281@psi-dev26.jf.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vJI8q/aziP9idhqk" Content-Disposition: inline In-Reply-To: <20150213220345.GB25281@psi-dev26.jf.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --vJI8q/aziP9idhqk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 13, 2015 at 02:03:45PM -0800, David Cohen wrote: > Hi Heikki, >=20 > On Fri, Feb 13, 2015 at 03:16:40PM +0200, Heikki Krogerus wrote: > > On Thu, Feb 12, 2015 at 05:41:30PM -0800, David Cohen wrote: > > > On Thu, Feb 12, 2015 at 02:12:14PM +0200, Heikki Krogerus wrote: > > > > > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > > > > > > index a8c9062..66cbf38 100644 > > > > > > --- a/drivers/usb/dwc3/core.c > > > > > > +++ b/drivers/usb/dwc3/core.c > > > > > > @@ -879,6 +879,10 @@ static int dwc3_probe(struct platform_devi= ce *pdev) > > > > > > platform_set_drvdata(pdev, dwc); > > > > > > dwc3_cache_hwparams(dwc); > > > > > > =20 > > > > > > + ret =3D dwc3_ulpi_init(dwc); > > > > >=20 > > > > > If I understood correctly, this call will result in enumerating t= he phy > > > > > via ULPI bus, then registering the correct ULPI device. > > > > > Can you guarantee ULPI will be always accessible at this point if= we > > > > > remove dwc3 module and load it again? > > > >=20 > > > > OK, got it. So yes, I can guarantee that ULPI will be acessible at > > > > this point. If we are in a state where we could soft reset dwc3, we > > > > know we can access ULPI. The fact that dwc3 itself expects to be ab= le > > > > to write to the ULPI registers at that point guarantees it for us. > > >=20 > > > I just double checked DWC3 TRM. > > > You are correct, by the time we're executing dwc3_core_soft_reset() U= LPI > > > bus is already accessible. But the TRM also specifies an ULPI phy wou= ld > > > be reset by DCTL's core soft reset, which is executed by dwc3_core_in= it() > > > before calling dwc3_core_soft_reset(). It does mention DWC3 writes da= ta > > > to an ULPI phy register during reset, but it also mentions the clock > > > sync happens during that time. > > >=20 > > > That makes no even OK, but more correct IMO to power on phy before > > > core's soft reset (i.e. by ACPI methods). But it lets us in a grey ar= ea > > > whether ULPI is reliably accessible before core's soft reset. > > >=20 > > > I believe if you move the dwc3_ulpi_init() to dwc3_core_init(), after > > > core's soft reset we've got no more grey area. > >=20 > > Well, we have already requested the phys in dwc3_probe before that so > > some refactoring will be needed. It's probable no a problem. >=20 > Sounds good :) >=20 > >=20 > > Btw, I'm sorry about telling this so late, but I'm going to be on > > vacation for the next two weeks. >=20 > Thanks for the notice. you'll be back right around merge window closing time :-) Not to worry, we'll have time to get this into the next merge window. --=20 balbi --vJI8q/aziP9idhqk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU3nUIAAoJEIaOsuA1yqREiNoP/2hw04V9H2iD5STKWwYwe+ny 0jVK4A5TerhawnNGfcn/CkwH3myx2/XL+0QSoFHKiRJds/fkckF5Vi8bWYeboXt0 HcNN1Ub3gLcFVz0uWL3cqmMpNxy1MWFR4rEQMyn9QPd6lSVkgnbieYDPIys+YVy5 hakfXn/4eLyNwrF84syaMzPA8LAxN9IYDUHk1tp+nwTf1+p95U0ypn6WWD67rJXm RJ4x+gZPxJE9TXTpH4TvEhNUYde/v11qIgvSW22+8q0uRb87xYn6TfHV+mF3ucCm p8VNBv8q1M/TchfMFnOtv25smVZKLIZ1yIPO3HAx0mSuRvrDNAWxmd1+o0+J0vS5 RquZUE5YBBG6T8BUYz7Cj6HwYUK0psxq9sobYdjChZo4ad9EDgeUpMYIQED3py/f R01rapOTOH6OQYnIBK9tqs5+TcyTpr1A4rftC3Ot8b5bJ6ZVgm2j2Fz7bxMen5Bx empDNNaW4BrAHviytpLixUCfW+lqAJ9fVQ1QgUHMdhgHqWUOy6lBV4iW8NXdoni8 wiD8TrF1sQN6fLN3h6nLO/mjrjTsNksANBEcHYb+CiAETuEo2iR9In0WwJq+9O2e yAxq9GuPZrkXktjX6RFO9wumbA2/QjUXUoI9kTuhAifzwuo/u3PJnjCpw5FXJPuc oQ3Bv+LDfPPWXWJqMAOi =heG5 -----END PGP SIGNATURE----- --vJI8q/aziP9idhqk--