From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [LINUX PATCH 1/5] mmc: Workaround for the issue in auto tuning mode.
Date: Tue, 19 Jan 2016 17:57:58 +0000 [thread overview]
Message-ID: <20160119175757.GR19062@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1453213055-35563-1-git-send-email-lakshmis@xilinx.com>
On Tue, Jan 19, 2016 at 07:47:31PM +0530, P L Sai Krishna wrote:
> +void arasan_tune_sdclk(struct sdhci_host *host)
static?
> +{
> + unsigned int clock;
> +
> + clock = host->clock;
Maybe combine the above two lines:
unsigned int clock = host->clock;
?
> +
> + /*
> + * As per controller erratum, program the SDCLK Frequency
> + * Select of clock control register with a value, say
> + * clock/2. Wait for the Internal clock stable and program
> + * the desired frequency.
> + */
> + host->ops->set_clock(host, clock/2);
The comment above says "wait for the internal clock stable" - I see
no wait in here. Does the code actually conform with the comment?
Please also use "clock / 2" as per coding style, thanks
> +
> + host->ops->set_clock(host, host->clock);
Maybe replace host->clock with clock?
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index d622435..8b064cd 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2043,6 +2043,11 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
> err = -EIO;
> }
>
> + if ((host->quirks2 & SDHCI_QUIRK2_BROKEN_TUNING) &&
> + (tuning_loop_counter >= 0) && (ctrl & SDHCI_CTRL_TUNED_CLK)) {
> + host->ops->tune_clk(host);
> + }
Do we need this "SDHCI_QUIRK2_BROKEN_TUNING" quirk at all? What's wrong
with:
if (host->ops->tune_clk && tuning_loop_counter >= 0 &&
ctrl & SDHCI_CTRL_TUNED_CLK)
host->ops->tune_clk(host);
here?
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-01-19 17:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 14:17 [LINUX PATCH 1/5] mmc: Workaround for the issue in auto tuning mode P L Sai Krishna
2016-01-19 14:17 ` [LINUX PATCH 2/5] Documentation: mmc: Updated the binding doc for Arasan SDHCI P L Sai Krishna
2016-01-19 16:50 ` Sören Brinkmann
2016-01-19 17:19 ` Rob Herring
2016-01-19 19:03 ` Michal Simek
2016-01-19 14:17 ` [LINUX PATCH 3/5] mmc: host: Added DT support to use SDIO in standard speed P L Sai Krishna
2016-01-19 14:17 ` [LINUX PATCH 4/5] Documentation: mmc: Updated the binding doc for Arasan SDHCI P L Sai Krishna
2016-01-19 17:16 ` Rob Herring
2016-01-20 5:51 ` Lakshmi Sai Krishna Potthuri
2016-01-20 15:05 ` Rob Herring
2016-01-19 14:17 ` [LINUX PATCH 5/5] mmc: host: Update the quirks for this controller P L Sai Krishna
2016-01-19 16:05 ` Holger Schurig
2016-01-19 15:01 ` [LINUX PATCH 1/5] mmc: Workaround for the issue in auto tuning mode Chen-Yu Tsai
2016-01-20 5:21 ` Lakshmi Sai Krishna Potthuri
2016-01-19 17:57 ` Russell King - ARM Linux [this message]
2016-01-20 6:02 ` Lakshmi Sai Krishna Potthuri
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=20160119175757.GR19062@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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).