[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4edc44f2-005e-803d-942c-171abd787252@intel.com>
Date: Wed, 11 Jan 2023 10:08:26 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Piyush Malgujar <pmalgujar@...vell.com>, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org, ulf.hansson@...aro.org,
robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
yamada.masahiro@...ionext.com, devicetree@...r.kernel.org
Cc: jannadurai@...vell.com, cchavva@...vell.com
Subject: Re: [PATCH 4/5] drivers: mmc: sdhci: Add option to configure sdhci
timeout
On 19/12/22 16:24, Piyush Malgujar wrote:
> From: Jayanthi Annadurai <jannadurai@...vell.com>
>
> Add config option to choose the sdhci timeout in seconds.
This approach is not ok, but why is the change wanted?
>
> Signed-off-by: Jayanthi Annadurai <jannadurai@...vell.com>
> Signed-off-by: Piyush Malgujar <pmalgujar@...vell.com>
> ---
> drivers/mmc/host/Kconfig | 8 ++++++++
> drivers/mmc/host/sdhci.c | 3 ++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index b5b2ae0bb4625bdb9d17acdbb1887c9caa3a1f32..ab48f2bc4cff73d1aad8d7da542d761cf0346d9f 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -1132,3 +1132,11 @@ config MMC_LITEX
> module will be called litex_mmc.
>
> If unsure, say N.
> +
> +config MMC_SDHCI_TIMEOUT
> + int
> + default 1 if MMC_SDHCI_CADENCE
> + default 10
> + depends on MMC_SDHCI
> + help
> + Default timeout value for command and data.
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index f3af1bd0f7b955272fbd8b034ecb591860b89aed..e9bc24258746834ec9c8f13fe24456587a2b758d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1707,7 +1707,8 @@ static bool sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
> else if (!cmd->data && cmd->busy_timeout > 9000)
> timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ;
> else
> - timeout += 10 * HZ;
> + timeout += CONFIG_MMC_SDHCI_TIMEOUT * HZ;
> +
> sdhci_mod_timer(host, cmd->mrq, timeout);
>
> if (host->use_external_dma)
Powered by blists - more mailing lists