Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965132AbbHKONI (ORCPT ); Tue, 11 Aug 2015 10:13:08 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:35967 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964890AbbHKONG (ORCPT ); Tue, 11 Aug 2015 10:13:06 -0400 Date: Tue, 11 Aug 2015 09:12:29 -0500 From: Felipe Balbi To: Yunzhi Li CC: , , , , , , John Youn , Greg Kroah-Hartman , , Subject: Re: [PATCH v1] usb: dwc2: reset AHB hclk domain before init Message-ID: <20150811141229.GB13920@saruman.tx.rr.com> Reply-To: References: <1439260062-12049-1-git-send-email-lyz@rock-chips.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu" Content-Disposition: inline In-Reply-To: <1439260062-12049-1-git-send-email-lyz@rock-chips.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 Content-Length: 2989 Lines: 87 --TRYliJ5NKNqkz5bu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Aug 11, 2015 at 10:27:42AM +0800, Yunzhi Li wrote: > We initiate dwc2 usb controller in BIOS, when kernel driver > start-up we should reset AHB hclk domain to reset all AHB > interface registers to default. Without this the FIFO value > setting might be incorrect because calculating FIFO size need the > power-on value of GRXFSIZ/GNPTXFSIZ/HPTXFSIZ registers. >=20 > This patch could avoid warnning massage like in rk3288 platform: > [ 2.074764] dwc2 ff580000.usb: 256 invalid for > host_perio_tx_fifo_size. Check HW configuration. >=20 > Signed-off-by: Yunzhi Li >=20 > --- >=20 > drivers/usb/dwc2/platform.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c > index 9093530..3da21ab 100644 > --- a/drivers/usb/dwc2/platform.c > +++ b/drivers/usb/dwc2/platform.c > @@ -42,6 +42,7 @@ > #include > #include > #include > +#include > =20 > #include > =20 > @@ -165,6 +166,7 @@ static int dwc2_driver_probe(struct platform_device *= dev) > struct resource *res; > struct phy *phy; > struct usb_phy *uphy; > + struct reset_control *rst; > int retval; > int irq; > =20 > @@ -189,6 +191,16 @@ static int dwc2_driver_probe(struct platform_device = *dev) > =20 > hsotg->dev =3D &dev->dev; > =20 > + /* AHB hclk domain reset, set all AHB interface registers to default */ > + rst =3D devm_reset_control_get_optional(&dev->dev, "ahb_reset"); why isn't this done in core so PCI systems can also make use of it ? --=20 balbi --TRYliJ5NKNqkz5bu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVygLNAAoJEIaOsuA1yqRE0M4P+wRZ+lM48e0DWEfQA1R0br7C MqYT/C8pn/EfIoOHfFlbsN6wNqlkJ/iWITeFxJ16thChXk4VVf2qo4aqbE04CVXi CJlGwUTVJSde3mMzZKrS4Fc8DB87VowNNZDpReKVQ8wCcXs0o25zH2sP9M8TRNiN 6AUM7AutkFaQUFoWij+5tXWHOF+rDpZ+euYOU6Z3zHp9aYvFOnCvVxTc67rfvWmV zE8nd5OC8aE+M5qp8kIN93iA6b5ImgAEu+yWw4VODBn78AHkvUEncucDSBx1EHcH HOP9xCazKBFia35uZ9wWo3J4kKGv9Yw6IwfB5813Fzp4+XZcp0P9WwgGw7KqeW++ sD+FD85COiVF1TRnYq1PxBRQbQAQqAdc5dANLltsADLFceU7U/FRD+I39C6rPJxt tmVi4kABx053XNkyUhtRq0oksEWgJdA0gy6c5m2CXdoLbDE6vmiLKJzW79VPA5cL RGCy9en6GVBy38o5J7n5yBeh/6+drPiB3qeADnB0h/ECBpxXHyN3hsoCxIfmynaQ Gu0avWPaTSzgWuXRonckluIFQ5Q9ORU3D6SUP0EVixuEY82yEUofT8f+m+DAkPIO t7vglTupLVApvpRyv0aMUy6xFuy/wWytUMbPs5hWzK1sXtRzE3Xc5u061xTp0QqW QxBnRO56sAyhd6H8B6ke =ulP2 -----END PGP SIGNATURE----- --TRYliJ5NKNqkz5bu-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/