From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Wildt Date: Tue, 27 Apr 2021 21:27:39 +0200 Subject: [PATCH 3/3] pci: pcie_dw_rockchip: Use udelay instead of msleep In-Reply-To: References: <20210426132632.10221-1-linux.amoon@gmail.com> <20210426132632.10221-3-linux.amoon@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Tue, Apr 27, 2021 at 11:11:19AM +0530 schrieb Anand Moon: > hi Patrick, > > On Tue, 27 Apr 2021 at 01:38, Patrick Wildt wrote: > > > > Am Mon, Apr 26, 2021 at 01:26:32PM +0000 schrieb Anand Moon: > > > Use udelay instead of msleep fix the below warning. > > > > You sure that's correct? the m in msleep means milli, while the u > > in udelay means micro. That's a factor of 1000 of a difference. > > > Thanks for your review comments. > > Most of the u-boot driver prefers udelay and usleep_range internally > calls udelay. > > I don't have the HW to test and verify. > > -Anand Sure, I'm not complaining about that. My point is that if you pass e. g. 8 milliseconds to a function that takes microseconds, you need to add the factor. Not good: msleep(1000) -> udelay(1000) Much better: msleep(1000) -> udelay(1000 * 1000) Which also means that you either have to rename PERST_WAIT_MS and change its value, or do udelay(PERST_WAIT_MS * 1000)