From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Adrian Hunter <adrian.hunter@intel.com>,
devicetree@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org, f.fainelli@gmail.com,
phil@raspberrypi.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/10] mmc: sdhci: Add quirk SDHCI_QUIRK2_SET_BUS_VOLTAGE
Date: Fri, 06 Mar 2020 13:40:54 +0100 [thread overview]
Message-ID: <444a97c46126bb86ca37da9bf26a840c38176bbe.camel@suse.de> (raw)
In-Reply-To: <55ef25ae-5c73-7778-dfda-976809cf9fe6@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 1803 bytes --]
On Fri, 2020-03-06 at 14:34 +0200, Adrian Hunter wrote:
> On 6/03/20 12:38 pm, Nicolas Saenz Julienne wrote:
> > Adds quirk for controllers whose bus power select register has to be set
> > even when powering SD cards from a regulator.
> >
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > ---
> > drivers/mmc/host/sdhci.c | 5 +++++
> > drivers/mmc/host/sdhci.h | 2 ++
> > 2 files changed, 7 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index c59566363a42..c7fd87447457 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -1920,6 +1920,11 @@ 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_SET_BUS_VOLTAGE) {
>
> We don't really want to replace callbacks by quirks.
>
> Replace sdhci_milbeaut_set_power() etc by a common fn in sdhci.c if you want.
Ok, fair enough.
Regards,
Nicolas
>
> > + sdhci_set_power_noreg(host, mode, vdd);
> > + return;
> > + }
> > +
> > if (mode != MMC_POWER_OFF)
> > sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL);
> > else
> > diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> > index cac2d97782e6..9531a4e5b148 100644
> > --- a/drivers/mmc/host/sdhci.h
> > +++ b/drivers/mmc/host/sdhci.h
> > @@ -484,6 +484,8 @@ struct sdhci_host {
> > * block count.
> > */
> > #define SDHCI_QUIRK2_USE_32BIT_BLK_CNT (1<<18)
> > +/* Set bus voltage even when powering from an external regulator */
> > +#define SDHCI_QUIRK2_SET_BUS_VOLTAGE (1<<19)
> >
> > int irq; /* Device IRQ */
> > void __iomem *ioaddr; /* Mapped address */
> >
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-06 12:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 10:38 [PATCH 00/10] Raspberry Pi vmmc regulator support Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 01/10] mmc: sdhci: Add quirk SDHCI_QUIRK2_SET_BUS_VOLTAGE Nicolas Saenz Julienne
2020-03-06 12:34 ` Adrian Hunter
2020-03-06 12:40 ` Nicolas Saenz Julienne [this message]
2020-03-06 10:38 ` [PATCH 02/10] mmc: sdhci: milbeaut: Use quirk instead of custom set_power() Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 03/10] mmc: sdhci: arsan: " Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 04/10] mmc: sdhci: at-91: " Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 05/10] mmc: sdhci: pxav3: " Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 06/10] mmc: sdhci: xenon: " Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 07/10] mmc: sdhci: am654: " Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 08/10] mmc: sdhci: Unexport sdhci_set_power_noreg() Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 09/10] mmc: sdhci: iproc: Use SDHCI_QUIRK2_SET_BUS_VOLTAGE on bcm2711 Nicolas Saenz Julienne
2020-03-06 10:38 ` [PATCH 10/10] ARM: dts: bcm2711: Add vmmc regulator in emmc2 Nicolas Saenz Julienne
2020-03-06 11:07 ` Stefan Wahren
2020-03-06 11:35 ` Phil Elwell
2020-03-06 11:37 ` Nicolas Saenz Julienne
2020-03-06 10:46 ` [PATCH 00/10] Raspberry Pi vmmc regulator support Phil Elwell
2020-03-06 10:52 ` Nicolas Saenz Julienne
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=444a97c46126bb86ca37da9bf26a840c38176bbe.camel@suse.de \
--to=nsaenzjulienne@suse.de \
--cc=adrian.hunter@intel.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=phil@raspberrypi.org \
--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).