From: Adrian Hunter <adrian.hunter@intel.com>
To: Piyush Malgujar <pmalgujar@marvell.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
ulf.hansson@linaro.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, yamada.masahiro@socionext.com,
devicetree@vger.kernel.org
Cc: jannadurai@marvell.com, cchavva@marvell.com
Subject: Re: [PATCH 4/5] drivers: mmc: sdhci: Add option to configure sdhci timeout
Date: Wed, 11 Jan 2023 10:08:26 +0200 [thread overview]
Message-ID: <4edc44f2-005e-803d-942c-171abd787252@intel.com> (raw)
In-Reply-To: <20221219142418.27949-5-pmalgujar@marvell.com>
On 19/12/22 16:24, Piyush Malgujar wrote:
> From: Jayanthi Annadurai <jannadurai@marvell.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@marvell.com>
> Signed-off-by: Piyush Malgujar <pmalgujar@marvell.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)
next prev parent reply other threads:[~2023-01-11 8:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 14:24 [PATCH 0/5] drivers: mmc: sdhci-cadence: SD6 controller support Piyush Malgujar
2022-12-19 14:24 ` [PATCH 1/5] " Piyush Malgujar
2022-12-19 15:41 ` Krzysztof Kozlowski
2022-12-23 11:07 ` Dan Carpenter
2023-01-11 8:19 ` Adrian Hunter
2022-12-19 14:24 ` [PATCH 2/5] drivers: mmc: sdhci-cadence: enable MMC_SDHCI_IO_ACCESSORS Piyush Malgujar
2023-01-01 1:30 ` kernel test robot
2023-01-11 8:23 ` Adrian Hunter
2023-01-12 14:12 ` Piyush Malgujar
2023-01-13 7:20 ` Adrian Hunter
2022-12-19 14:24 ` [PATCH 3/5] dt-bindings: mmc: sdhci-cadence: SD6 support Piyush Malgujar
2022-12-19 15:40 ` Krzysztof Kozlowski
2023-01-06 16:48 ` Piyush Malgujar
2023-01-07 13:25 ` Krzysztof Kozlowski
2023-01-18 16:02 ` Piyush Malgujar
2022-12-19 14:24 ` [PATCH 4/5] drivers: mmc: sdhci: Add option to configure sdhci timeout Piyush Malgujar
2023-01-11 8:08 ` Adrian Hunter [this message]
2023-01-12 13:44 ` Piyush Malgujar
2022-12-19 14:24 ` [PATCH 5/5] drivers: mmc: sdhci-cadence: Add debug option for sdhci-cadence driver Piyush Malgujar
2022-12-19 17:14 ` kernel test robot
2022-12-20 4:01 ` kernel test robot
2023-01-11 8:29 ` Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4edc44f2-005e-803d-942c-171abd787252@intel.com \
--to=adrian.hunter@intel.com \
--cc=cchavva@marvell.com \
--cc=devicetree@vger.kernel.org \
--cc=jannadurai@marvell.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=pmalgujar@marvell.com \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).