Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751770AbbBJOru (ORCPT ); Tue, 10 Feb 2015 09:47:50 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:50166 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbbBJOrt (ORCPT ); Tue, 10 Feb 2015 09:47:49 -0500 Date: Tue, 10 Feb 2015 08:47:18 -0600 From: Felipe Balbi To: Yunzhi Li CC: , , , , , , , , , , , , , Greg Kroah-Hartman , , Subject: Re: [RFC PATCH v1] usb: dwc2: reduce dwc2 driver probe time Message-ID: <20150210144718.GB16711@saruman.tx.rr.com> Reply-To: References: <1423577139-4165-1-git-send-email-lyz@rock-chips.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E39vaYmALEf/7YXx" Content-Disposition: inline In-Reply-To: <1423577139-4165-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: 2555 Lines: 67 --E39vaYmALEf/7YXx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Feb 10, 2015 at 10:05:39PM +0800, Yunzhi Li wrote: > I found that the probe function of dwc2 driver takes much time > when kernel boot up. There are many long delays in the probe > function these take almost 1 second. >=20 > This patch trying to reduce unnecessary delay time. >=20 > In dwc2_core_reset() I see it use two at least 20ms delays to > wait AHB idle and core soft reset, but dwc2 data book said that > dwc2 core soft reset and AHB idle just need a few clocks (I think > it refers to AHB clock, and AHB clock run at 150MHz in my RK3288 > board), so 20ms is too long, delay 1us for wait AHB idle and soft > reset is enough. do you know what's the upper boundary for AHB clock ? How fast can it be? It's not wise to change timers because "it works on my RK3288 board", you need to guarantee that this won't break anybody else. The only way to do that is to look at the architecture part of dwc2 and see if there are any limits to how fast AHB clock can be. Also, you're not even sure if it refers to AHB clock. Usually, you can also change which clock source to use, so you need to cope with that as well. Please go back to your documentation and figure these out. Thanks --=20 balbi --E39vaYmALEf/7YXx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU2hn2AAoJEIaOsuA1yqREyRkP/j2mD7jRUv80w7DV7oKRSuJa 2pyGe/k+bCp6qMemvxakkVH3spuQgW++spiW7iVG4EtqgEd3JkiK3r4lIYWcDPVW +npU0VTvKIOexVuC86AijytEjym4kH772/MJkQiqJAUjoFvGX2vIR3cq7U6WGlw5 upERb46V5zIYYh/pCIdmuMkkPei1X5KefktMM8tAZQE+8jfifBhQe6ZatfPoaEA5 i6lqgGuOU6FN+3JqBNnueF2RidEvuHO99S3WdxCKvCji+cXRdWv6C/A94t4EFb5r J15w3A/WKx5J25hmtDYjOw4lvkjLK76oKcJESUi9RucvYuIiDer9jup/rbgi1lXF 3iRx634f/Ujdk+rDh1v+sZcNirD6t3JiANR2Xmzh1WiWtI9bcuxgu7Xzfwc7G5Nf j4Bcc4vHJfTRCRzdgFishRoNSWBHykpEVYxCogH8HSos5aIdLUEqeCAJRdMM5BQf L431035pTZwE7HKEAzVCzY2GDa9MIi2yIhdrKYK2vjZgWS8W6Qhq4SQqyk5SVVAD gHeok1grZjonM2Kgo2D1JjvkRnPiV7F3Q/VnQYofldxsPVVFBb/kfn3TdvkznfUB 3viuz8Bj7Ffa8gOnfvNoncRvsktAHtKv5Hiqej+F8xJhb+QG4kaqbwMELFgysVQM KHI5e/LCXPey/gGAydtd =B5Zf -----END PGP SIGNATURE----- --E39vaYmALEf/7YXx-- -- 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/