From: Adrian Hunter <adrian.hunter@intel.com>
To: Troy Kisky <troy.kisky@boundarydevices.com>, aisheng.dong@nxp.com
Cc: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
fabio.estevam@nxp.com, gary.bisson@boundarydevices.com
Subject: Re: [PATCH] mmc: sdhci: clear interrupt when retune interrupt received
Date: Mon, 12 Jun 2017 15:33:50 +0300 [thread overview]
Message-ID: <bf88c79a-acde-9780-b90a-b25dc9f9bae2@intel.com> (raw)
In-Reply-To: <e43d517d-2a73-e619-eba8-f652da15ccd5@boundarydevices.com>
On 09/06/17 18:45, Troy Kisky wrote:
> On 6/9/2017 5:46 AM, Adrian Hunter wrote:
>> On 08/06/17 21:51, Troy Kisky wrote:
>>> This lets the loop exit before max_loops reaches 0.
>>
>> Needs more explanation.
>>
>>>
>>> Fixes: f37b20ebc4bc ("mmc: sdhci: add standard hw auto retuning support")
>>>
>>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>>> ---
>>> drivers/mmc/host/sdhci.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>>> index ecd0d43..e104194 100644
>>> --- a/drivers/mmc/host/sdhci.c
>>> +++ b/drivers/mmc/host/sdhci.c
>>> @@ -2687,7 +2687,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
>>>
>>> /* Clear selected interrupts. */
>>> mask = intmask & (SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK |
>>> - SDHCI_INT_BUS_POWER);
>>> + SDHCI_INT_BUS_POWER | SDHCI_INT_RETUNE);
>>
>> SDHCI_INT_RETUNE is defined to be read-only so why write to it.
>
>
> SDHCI_INT_RETUNE is bit 12
> host/sdhci.h:#define SDHCI_INT_RETUNE 0x00001000
>
> Which at least from i.mx6/i.mx7 reference manuals, is a write 1 to clear bit(marked as w1c).
So it doesn't work the way it is specified in the SDHCI spec.
It should be harmless to write 1, but you still need to explain how the bit
works on your hardware. What does "This lets the loop exit before max_loops
reaches 0" mean?
>
>
>
>>
>>> sdhci_writel(host, mask, SDHCI_INT_STATUS);
>>>
>>> if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) {
>>>
>>
>>
>
>
next prev parent reply other threads:[~2017-06-12 12:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 18:51 [PATCH] mmc: sdhci: clear interrupt when retune interrupt received Troy Kisky
2017-06-09 12:46 ` Adrian Hunter
2017-06-09 15:45 ` Troy Kisky
2017-06-12 12:33 ` Adrian Hunter [this message]
2017-06-12 14:03 ` A.S. Dong
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=bf88c79a-acde-9780-b90a-b25dc9f9bae2@intel.com \
--to=adrian.hunter@intel.com \
--cc=aisheng.dong@nxp.com \
--cc=fabio.estevam@nxp.com \
--cc=gary.bisson@boundarydevices.com \
--cc=linux-mmc@vger.kernel.org \
--cc=troy.kisky@boundarydevices.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