Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751984AbbHLTdS (ORCPT ); Wed, 12 Aug 2015 15:33:18 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:42326 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbbHLTdQ (ORCPT ); Wed, 12 Aug 2015 15:33:16 -0400 Date: Wed, 12 Aug 2015 14:32:44 -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: <20150812193244.GA20972@saruman.tx.rr.com> Reply-To: References: <1439260062-12049-1-git-send-email-lyz@rock-chips.com> <20150811141229.GB13920@saruman.tx.rr.com> <55CB28A1.6090208@rock-chips.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline In-Reply-To: <55CB28A1.6090208@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: 3441 Lines: 92 --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 12, 2015 at 07:06:09PM +0800, Yunzhi Li wrote: > Hi , > =E5=9C=A8 2015/8/11 22:12, Felipe Balbi =E5=86=99=E9=81=93: > >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. > >> > >>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. > >> > >>Signed-off-by: Yunzhi Li > >> > >>--- > >> > >> drivers/usb/dwc2/platform.c | 12 ++++++++++++ > >> 1 file changed, 12 insertions(+) > >> > >>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 > >> #include > >>@@ -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; > >>@@ -189,6 +191,16 @@ static int dwc2_driver_probe(struct platform_devic= e *dev) > >> hsotg->dev =3D &dev->dev; > >>+ /* 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 ? > > > I have no ides about how to reset a PCI interface dwc2 controller, John > could you please give some infomation about it ? > Is it also needed for PCI interface dwc2 IP ? even on platform only, how do you know all users provide a ahb_reset reset controller ? --=20 balbi --EVF5PPMfhYS0aIcm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVy59cAAoJEIaOsuA1yqRE8B4P/1+b0gR47OA7udYlRPBlIAFm RuORuv4hTO4Sjn4ae6DX0tD8EDfrUpy9LZgdDfzSs6Sp097Un1sYTr37+1mDWrf2 c0pAWuekjsc2Z+41V97Ev/cUt4S9/Se9KcexFDMBSamqrCMJ+EiT8KutT5vqjQv+ b9/cLK6zZPURh+smTsN5h+RB0JRHRItj+BYZfqWIlYwkDMqzuM3TMSOr/0f/K9Mp AdcPLY8j1/9ojkokiOKoQxeTHKmeWfADuw7i2gihjNnCwPolNjufQcDlbz0vHnHw Vab051OLWl6Qm8qGy1lkfDdDrTcL/C+O3LKlJi9QYt8eMbeFOHOHpD/ppghAwvV2 kDQL2gDGkDwOnYEPuB7caULkDm2P+3fMw7dOLbyXh3YuS2xkhER9nM80ypQbg5Am eMjM2TY9A+FDCJmrDjjTSxz0t2kq12oZg91uNUMnrkG9OUKDzdXqtoPfpQcyFwa5 GbjkRT82L0Z/67QLv/raRjEcTfFEA9GkCvSaszWrsHzsdmPJNaatWthN9dfbmx7z yFwVjCjziiCTyItzxxcjXmEeJcjwwWa+zxtuvIB2mJotAn8uuBByBOrVhpVyVNAP rOlsaC0WO/T/EANRRvRKaH2Y1dHf72Gpf8LOwmmeFnR3/GwNiJkhhabjByFVuyaf NYIr6IQxLmnxZ6ReASvc =8hE1 -----END PGP SIGNATURE----- --EVF5PPMfhYS0aIcm-- -- 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/