From: Kishon Vijay Abraham I <kishon@ti.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Tony Lindgren <tony@atomide.com>,
Rob Herring <robh+dt@kernel.org>
Cc: <nsekhar@ti.com>, <linux-omap@vger.kernel.org>,
<linux-mmc@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 4/7] mmc: sdhci: Add quirk to indicate broken POWER_CONTROL
Date: Thu, 17 Aug 2017 11:02:29 +0530 [thread overview]
Message-ID: <c7712629-f462-b315-fd79-67882549ef83@ti.com> (raw)
In-Reply-To: <45762ded-3c42-fefc-e6bb-2542d75c9c67@intel.com>
On Tuesday 15 August 2017 01:11 PM, Adrian Hunter wrote:
> On 07/08/17 19:01, Kishon Vijay Abraham I wrote:
>> TI's implementation of sdhci controller used in DRA7 SoC's uses
>> POWER_CONTROL register for configuring IO voltage and not
>> for core voltage (vdd) which is it's intended use. Add a quirk
>> to indicate broken POWER_CONTROL register.
>
> A quirk isn't needed for this. Use the ->set_power() callback instead.
sure!
Thanks
Kishon
>
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> drivers/mmc/host/sdhci.c | 6 ++++++
>> drivers/mmc/host/sdhci.h | 2 ++
>> 2 files changed, 8 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index d5050ec42481..a7465a56e6b5 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -1419,6 +1419,9 @@ static void sdhci_set_power_reg(struct sdhci_host *host, unsigned char mode,
>>
>> mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
>>
>> + if (host->quirks2 & SDHCI_QUIRK2_BROKEN_POWER_CONTROL)
>> + return;
>> +
>> if (mode != MMC_POWER_OFF)
>> sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL);
>> else
>> @@ -1430,6 +1433,9 @@ void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
>> {
>> u8 pwr = 0;
>>
>> + if (host->quirks2 & SDHCI_QUIRK2_BROKEN_POWER_CONTROL)
>> + return;
>> +
>> if (mode != MMC_POWER_OFF) {
>> switch (1 << vdd) {
>> case MMC_VDD_165_195:
>> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
>> index 39c7a2723906..ba94cca7c892 100644
>> --- a/drivers/mmc/host/sdhci.h
>> +++ b/drivers/mmc/host/sdhci.h
>> @@ -439,6 +439,8 @@ struct sdhci_host {
>> #define SDHCI_QUIRK2_NO_CRC_STRIPPING (1<<16)
>> /* Controller has bad caps bits, but really supports DMA */
>> #define SDHCI_QUIRK2_FORCE_ADMA (1<<17)
>> +/* Controller uses POWER_CONTROL for managing IO voltage and not core voltage */
>> +#define SDHCI_QUIRK2_BROKEN_POWER_CONTROL (1<<18)
>>
>> int irq; /* Device IRQ */
>> void __iomem *ioaddr; /* Mapped address */
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" 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:[~2017-08-17 5:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 16:01 [RFC PATCH 0/7] mmc: Add OMAP SDHCI driver Kishon Vijay Abraham I
2017-08-07 16:01 ` [RFC PATCH 1/7] mmc: sdhci: Add quirk to indicate no CRC stripping in MMC_RSP_136 Kishon Vijay Abraham I
2017-08-15 7:27 ` Adrian Hunter
2017-08-17 5:20 ` Kishon Vijay Abraham I
2017-08-17 6:31 ` Adrian Hunter
2017-08-17 7:40 ` Kishon Vijay Abraham I
2017-08-07 16:01 ` [RFC PATCH 2/7] mmc: sdhci: Add quirk to indicate controller supports ADMA2 Kishon Vijay Abraham I
2017-08-15 7:33 ` Adrian Hunter
2017-08-17 5:30 ` Kishon Vijay Abraham I
2017-08-07 16:01 ` [RFC PATCH 3/7] mmc: sdhci: Add callback to set bus mode Kishon Vijay Abraham I
2017-08-15 7:38 ` Adrian Hunter
2017-08-17 5:31 ` Kishon Vijay Abraham I
2017-08-07 16:01 ` [RFC PATCH 4/7] mmc: sdhci: Add quirk to indicate broken POWER_CONTROL Kishon Vijay Abraham I
2017-08-15 7:41 ` Adrian Hunter
2017-08-17 5:32 ` Kishon Vijay Abraham I [this message]
2017-08-07 16:01 ` [RFC PATCH 5/7] dt-bindings: ti-omap-hsmmc: Document new compatible for sdhci omap Kishon Vijay Abraham I
2017-08-09 22:12 ` Tony Lindgren
2017-08-17 5:43 ` Kishon Vijay Abraham I
2017-08-17 16:05 ` Tony Lindgren
2017-08-07 16:01 ` [RFC PATCH 6/7] mmc: sdhci-omap: Add OMAP SDHCI driver Kishon Vijay Abraham I
2017-08-15 8:22 ` Adrian Hunter
2017-08-17 5:57 ` Kishon Vijay Abraham I
2017-08-17 6:43 ` Adrian Hunter
2017-08-17 7:59 ` Kishon Vijay Abraham I
2017-08-17 8:23 ` Adrian Hunter
2017-08-20 11:03 ` Kishon Vijay Abraham I
2017-08-07 16:01 ` [RFC PATCH 7/7] MAINTAINERS: Add TI OMAP SDHCI Maintainer Kishon Vijay Abraham I
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=c7712629-f462-b315-fd79-67882549ef83@ti.com \
--to=kishon@ti.com \
--cc=adrian.hunter@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.com \
--cc=ulf.hansson@linaro.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).