lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d4785dc46f7798fe96366d6128e068f623ce1c2.camel@toradex.com>
Date:   Fri, 10 Nov 2023 14:55:51 +0000
From:   João Paulo Silva Gonçalves 
        <joao.goncalves@...adex.com>
To:     "nm@...com" <nm@...com>, "vigneshr@...com" <vigneshr@...com>
CC:     "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
        "adrian.hunter@...el.com" <adrian.hunter@...el.com>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Francesco Dolcini <francesco.dolcini@...adex.com>
Subject: Re: SDHCI AM654 driver delaying boot time

On Fri, 2023-11-10 at 10:08 +0530, Vignesh Raghavendra wrote:
> Hi Joao
> 
> On 09/11/23 23:21, Nishanth Menon wrote:
> > On 18:56-20231108, João Paulo Silva Gonçalves wrote:
> > > Hello all, 
> > > 
> > > We are trying to minimize boot time for our AM62 devices. Unfortunately, we have identified a delay of approximately 1.5 seconds caused by the
> > > sdhci_am654 driver. This delay is a result of a timeout within the driver (MAX_POWER_ON_TIMEOUT) and was introduced in commit 7ca0f16 ("mmc:
> > > sdhci_am654: Add workaround for card detect debounce timer"). This issue arises only when there is no SD card present in the MMC slot.  We tested the
> > > driver with a lower timeout value and everything worked. However, as indicated in the commit message, this timeout may be related to the way the sdhci
> > > controller hardware IP works. Currently, the driver employs a sort of a "busy loop" to wait for this timeout to pass delaying the boot. Why is
> > > need to busy loop for this timeout? Is it possible to wait for it in the backgroud? Am I am missing something here? 
> 
> sdhci_am654_write_power_on() does have usleep_range() of 1 to 10ms. If
> that isn't sufficient to preempt and allow other drivers to probe, then
> probably worth setting sleep_us in read_poll_timeout() call.
> 
> 
> > 
> > I am not an mmc expert, but, Isn't this sequence part of the programmer
> > manual in the TRM[1]? Either way, one additional issue I did end up with
> > when I was doing beagleplay[2] was when i booted off emmc and runtime PM
> > disabled SD/MMC interface, the MMC IP's CD mode would'nt work since the
> > IP isn't clocked. So I switched the mux mode to GPIO to use mmc CD
> > there. I haven't timed that approach where
> > SDHCI_AM654_QUIRK_FORCE_CDTEST would get set.
> > 
> > [1] https://www.ti.com/lit/pdf/spruiv7
> > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts#n835
> 
> 
> Above is a good experiment to see if it helps boot time. Can you set
> SDCD line to GPIO and hook up using cd-gpios?  You would also need to
> set ti,fails-without-test-cd
> 

I will try what Nishanth said about the gpio and also increase sleep_us. 
Thank for the insights! 

Regards,
Joao Paulo Goncalves

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ