From: Luca Weiss <luca@z3ntu.xyz> To: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stephen Boyd <sboyd@codeaurora.org>, Sahitya Tummala <stummala@codeaurora.org>, Vijay Viswanath <vviswana@codeaurora.org> Subject: Re: [v2] mmc: sdhci-msm: Optionally wait for signal level changes Date: Tue, 21 Nov 2017 20:38:31 +0100 Message-ID: <2689768.7AuDOzprkX@g550jk> (raw) In-Reply-To: <20171120195647.22677-1-bjorn.andersson@linaro.org> On Montag, 20. November 2017 20:56:47 CET Bjorn Andersson wrote: > Not all instances of the SDCC core supports changing signal voltage and > as such will not generate a power interrupt when the software attempts > to change the voltage. This results in probing the eMMC on some devices > to take over 2 minutes. > > Check that the SWITCHABLE_SIGNALING_VOLTAGE bit in MCI_GENERICS is set > before waiting for the power interrupt. > > Cc: Sahitya Tummala <stummala@codeaurora.org> > Cc: Vijay Viswanath <vviswana@codeaurora.org> > Fixes: c0309b3803fe ("mmc: sdhci-msm: Add sdhci msm register write APIs > which wait for pwr irq") Signed-off-by: Bjorn Andersson > <bjorn.andersson@linaro.org> Tested-by: Luca Weiss <luca@z3ntu.xyz> > --- > > The offending patch is part of your v4.15 pull request, so please pick > this up for the -rcs. > > Changes since v1: > - Fixed spelling of swichable... > > drivers/mmc/host/sdhci-msm.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c > index 3fb7d2eec93f..c283291db705 100644 > --- a/drivers/mmc/host/sdhci-msm.c > +++ b/drivers/mmc/host/sdhci-msm.c > @@ -29,6 +29,9 @@ > #define CORE_VERSION_MAJOR_MASK (0xf << CORE_VERSION_MAJOR_SHIFT) > #define CORE_VERSION_MINOR_MASK 0xff > > +#define CORE_MCI_GENERICS 0x70 > +#define SWITCHABLE_SIGNALING_VOLTAGE BIT(29) > + > #define CORE_HC_MODE 0x78 > #define HC_MODE_EN 0x1 > #define CORE_POWER 0x0 > @@ -1028,11 +1031,22 @@ static void sdhci_msm_check_power_status(struct > sdhci_host *host, u32 req_type) struct sdhci_pltfm_host *pltfm_host = > sdhci_priv(host); > struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host); > bool done = false; > + u32 val; > > pr_debug("%s: %s: request %d curr_pwr_state %x curr_io_level %x\n", > mmc_hostname(host->mmc), __func__, req_type, > msm_host->curr_pwr_state, msm_host->curr_io_level); > > + /* > + * The power interrupt will not be generated for signal voltage > + * switches if SWITCHABLE_SIGNALING_VOLTAGE in MCI_GENERICS is not set. > + */ > + val = readl(msm_host->core_mem + CORE_MCI_GENERICS); > + if ((req_type & REQ_IO_HIGH || req_type & REQ_IO_LOW) && > + !(val & SWITCHABLE_SIGNALING_VOLTAGE)) { > + return; > + } > + > /* > * The IRQ for request type IO High/LOW will be generated when - > * there is a state change in 1.8V enable bit (bit 3) of
next prev parent reply index Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-11-20 18:34 [PATCH] " Bjorn Andersson 2017-11-20 19:25 ` Stephen Boyd 2017-11-20 19:56 ` [PATCH v2] " Bjorn Andersson 2017-11-21 19:38 ` Luca Weiss [this message] 2017-11-23 18:13 ` 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=2689768.7AuDOzprkX@g550jk \ --to=luca@z3ntu.xyz \ --cc=adrian.hunter@intel.com \ --cc=bjorn.andersson@linaro.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mmc@vger.kernel.org \ --cc=sboyd@codeaurora.org \ --cc=stummala@codeaurora.org \ --cc=ulf.hansson@linaro.org \ --cc=vviswana@codeaurora.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
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git