From: Jaehoon Chung <jh80.chung@samsung.com>
To: Suneel Garapati <suneel.garapati@xilinx.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
michals@xilinx.com, sorenb@xilinx.com,
Adrian Hunter <adrian.hunter@intel.com>,
Aisheng Dong <b29396@freescale.com>,
Haibo Chen <haibo.chen@freescale.com>,
Tim Kryger <tim.kryger@gmail.com>,
Shawn Guo <shawn.guo@linaro.org>, Yi Sun <yi.y.sun@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
stripathi@apm.com
Subject: Re: [PATCH 1/2] drivers: mmc: add quirk SDHCI_QUIRK_CLOCK_DIV_ZERO_BROKEN
Date: Tue, 09 Jun 2015 17:44:10 +0900 [thread overview]
Message-ID: <5576A75A.5050104@samsung.com> (raw)
In-Reply-To: <1433835111-32522-2-git-send-email-suneel.garapati@xilinx.com>
Hi,
On 06/09/2015 04:31 PM, Suneel Garapati wrote:
> adds quirk for controllers whose clock divider zero is broken,
> sdhci_set_clock function will incorporate this modification.
>
> Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com>
> ---
> drivers/mmc/host/sdhci.c | 4 ++++
> drivers/mmc/host/sdhci.h | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 1b4861d..087327e 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1210,6 +1210,10 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
> }
> real_div = div;
> div >>= 1;
> + if ((host->quirks2 & SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN)
> + && !div && host->max_clk <= 25000000) {
> + div = 1;
> + }
I can't understand fully. how can it be broken for divider zero?
When formatting error is occurred, do you check really clock value?
I think your patch looks like just hard-coding for control clock.
Best Regards,
Jaehoon Chung
> }
> } else {
> /* Version 2.00 divisors must be a power of 2. */
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index 5521d29..67046ca 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -409,6 +409,8 @@ struct sdhci_host {
> #define SDHCI_QUIRK2_SUPPORT_SINGLE (1<<13)
> /* Controller broken with using ACMD23 */
> #define SDHCI_QUIRK2_ACMD23_BROKEN (1<<14)
> +/* Broken Clock divider zero in controller */
> +#define SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN (1<<15)
>
> int irq; /* Device IRQ */
> void __iomem *ioaddr; /* Mapped address */
> --
> 2.1.2
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2015-06-09 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 7:31 [PATCH 0/2] adds quirk SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN Suneel Garapati
2015-06-09 7:31 ` [PATCH 1/2] drivers: mmc: add quirk SDHCI_QUIRK_CLOCK_DIV_ZERO_BROKEN Suneel Garapati
2015-06-09 8:44 ` Jaehoon Chung [this message]
2015-06-09 7:31 ` [PATCH 2/2] drivers: mmc: add quirks for broken clock base Suneel Garapati
2015-07-20 11:18 ` [PATCH 0/2] adds quirk SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN Ulf Hansson
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=5576A75A.5050104@samsung.com \
--to=jh80.chung@samsung.com \
--cc=adrian.hunter@intel.com \
--cc=b29396@freescale.com \
--cc=haibo.chen@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=michals@xilinx.com \
--cc=rafael.j.wysocki@intel.com \
--cc=shawn.guo@linaro.org \
--cc=sorenb@xilinx.com \
--cc=stripathi@apm.com \
--cc=suneel.garapati@xilinx.com \
--cc=tim.kryger@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=yi.y.sun@intel.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).