From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752714AbdLKKZ3 (ORCPT ); Mon, 11 Dec 2017 05:25:29 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:43197 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbdLKKZ0 (ORCPT ); Mon, 11 Dec 2017 05:25:26 -0500 X-Google-Smtp-Source: AGs4zMai9Np8yjnZprC1mrWW7U/hYo/wZsFV3J2bKKLFOmeu/LzKqFqHon/ov48c3NJndii+pI67Tg== Date: Mon, 11 Dec 2017 11:25:23 +0100 From: Thierry Reding To: Dmitry Osipenko Cc: Felipe Balbi , Alan Stern , Greg Kroah-Hartman , Jonathan Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] usb: tegra: Move UTMI-pads reset from ehci-tegra to tegra-phy Message-ID: <20171211102523.GH10671@ulmo> References: <853ce44924e396b907332d4f3ad4ae70eae9bbcc.1512946782.git.digetx@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AzNpbZlgThVzWita" Content-Disposition: inline In-Reply-To: <853ce44924e396b907332d4f3ad4ae70eae9bbcc.1512946782.git.digetx@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --AzNpbZlgThVzWita Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 11, 2017 at 02:07:38AM +0300, Dmitry Osipenko wrote: > UTMI pads are shared by USB controllers and reset of UTMI pads is shared > with the reset of USB1 controller. Currently reset of UTMI pads is done by > the EHCI driver and ChipIdea UDC works because EHCI driver always happen > to be probed first. Move reset controls from ehci-tegra to tegra-phy in > order to resolve the problem. >=20 > Signed-off-by: Dmitry Osipenko > --- > drivers/usb/host/ehci-tegra.c | 87 ++++++++++++++++++---------------= ------ > drivers/usb/phy/phy-tegra-usb.c | 46 +++++++++++++++++++++ > include/linux/usb/tegra_usb_phy.h | 2 + > 3 files changed, 87 insertions(+), 48 deletions(-) I don't think we can do this. For one I don't think shared resets are going to work here because you really won't ever be able to reset after two devices have requested the same reset. Second, utmip_pad_close() could be called at any point and it will have the side-effect of either not doing a reset at all (because it is shared) or resetting the USBD controller at the same time. We've been over this code a great deal over the years. I'd love it to be simpler, but every time we tried to simplify it, things broke. Thierry --AzNpbZlgThVzWita Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlouXRAACgkQ3SOs138+ s6GD9hAAgUya2bVor/dh9QcnoOapus20lPQZVX50ugDgmjze/eZ57Eg9yzLVnq2x Ap40q3X3oplaqbHHnpI4INF9CBqvIr4kYIL5FHHxYxK+KalBgg6QQYprICW0gTgO IL5romtLh5dff/VQgzqRHofkdQrD1Z8rRM5HS5q6X1xBz2kUxj5YiuQN1TUrDDzz LHEgWg62Yo3ztYNrS0sU5JhD5Ztq20yfeoJAlv7aLyVfYDviGK6rJ73PvKTlDuqc z5zmTYVruTqEMcs4Nw+HHubdzmtJyyxWEYwieLCCahqwY6so2pkqo+x0zclsWPf0 pQhlCDHL7eW0NV5fNK1SvsfLXUvYbIadcu41W9awY1V0/H3gyhdYXNSXZLWX5BB6 JwX+4AO6k4iihiwted3YvZU9kLLmw1P8pgLLtuiIJyHI/gr1Hv0oQyZ/69qTEKH/ 2WfwHXadcoOwxuuuqar0E8kilbImd3bRjuSC01lCEHHFce0xSi+wSh5ik6vHAbsa OwNRkhKQLVoVXpAFLpcPKCSaHFxcNBBBgTr9ujuEEVo09KeLV0u+xUDu+28rXmYw FZ7fl2wYPI2ZH60EkhQpUiPmk/nCQOE2anUHOoF5JJ9i6CD/jXUPl61DLLNtZX0E hxKJ3D1lMzpQSmshCaa0O4MSUNQ4szwLT/MeahWvlT+H41hI16E= =Spc9 -----END PGP SIGNATURE----- --AzNpbZlgThVzWita--