[PATCH 4/4] mci: bcm2835: set timeout value to 100ms
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Nov 6 06:01:00 PST 2024
Hello Sebastien,
Thanks for your fix.
On 31.10.24 10:27, Sebastien Bourdelin wrote:
> From: Sebastien Bourdelin <sebastien.bourdelin at rtone.fr>
>
> As mentionned in the Raspberry Pi4 bootrom Changelog [1]:
> "Increase timeout of early SD/EMMC commands to 100ms".
> The BCM2711 SDHCI can take up to 100ms to complete a command.
>
> Without this change, we had noticed that Barebox sometime stay stucked
> on a timeout error while trying to boot Linux from the eMMC.
>
> [1] https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware-2711/release-notes.md#2022-03-10---promote-the-2022-03-10-beta-release-to-lateststable
>
> Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin at rtone.fr>
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
Cheers,
Ahmad
> ---
> drivers/mci/mci-bcm2835.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
> index cbf99ee7ca..3b086ed22c 100644
> --- a/drivers/mci/mci-bcm2835.c
> +++ b/drivers/mci/mci-bcm2835.c
> @@ -128,6 +128,10 @@ static int bcm2835_mci_request(struct mci_host *mci, struct mci_cmd *cmd,
> block_data |= data->blocksize;
> }
>
> + /* BCM2xxx SDHCI might take up to 100ms to complete a command */
> + if (cmd != NULL)
> + cmd->busy_timeout = 100;
> +
> ret = sdhci_wait_idle_data(&host->sdhci, cmd);
> if (ret)
> return ret;
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list