From: Adrian Hunter <adrian.hunter@intel.com>
To: Ritesh Harjani <riteshh@codeaurora.org>, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
stummala@codeaurora.org, asutoshd@codeaurora.org
Subject: Re: [RFC 1/4] mmc: cqhci: Move CQHCI_ENABLE before setting TDLBA/TDLBAU
Date: Thu, 31 Aug 2017 09:01:34 +0300 [thread overview]
Message-ID: <82b52d84-6eb1-9f97-5e0a-bea6d25ddbda@intel.com> (raw)
In-Reply-To: <1504098251-27739-2-git-send-email-riteshh@codeaurora.org>
On 30/08/17 16:04, Ritesh Harjani wrote:
> Without this patch the CQHCI registers are getting reset
> again.
>
> Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
> ---
> drivers/mmc/host/cqhci.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/cqhci.c b/drivers/mmc/host/cqhci.c
> index 8650a13..2a7351c 100644
> --- a/drivers/mmc/host/cqhci.c
> +++ b/drivers/mmc/host/cqhci.c
> @@ -262,6 +262,9 @@ static void __cqhci_enable(struct cqhci_host *cq_host)
>
> cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
>
> + cqcfg |= CQHCI_ENABLE;
> + cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
That doesn't follow the flow in the specification B.6.1. Command Queuing
Initialization Sequence. Also in B.3.5 Task List, the spec. says "Changing
the value of TDLBA is not allowed when command queue mode is enabled."
So you will need to add a quirk for this.
> +
> cqhci_writel(cq_host, lower_32_bits(cq_host->desc_dma_base),
> CQHCI_TDLBA);
> cqhci_writel(cq_host, upper_32_bits(cq_host->desc_dma_base),
> @@ -271,10 +274,6 @@ static void __cqhci_enable(struct cqhci_host *cq_host)
>
> cqhci_set_irqs(cq_host, 0);
>
> - cqcfg |= CQHCI_ENABLE;
> -
> - cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
> -
> mmc->cqe_on = true;
>
> if (cq_host->ops->enable)
>
next prev parent reply other threads:[~2017-08-31 6:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 13:04 [RFC 0/4] mmc: sdhci-msm: Add CQE support for sdhci-msm Ritesh Harjani
2017-08-30 13:04 ` [RFC 1/4] mmc: cqhci: Move CQHCI_ENABLE before setting TDLBA/TDLBAU Ritesh Harjani
2017-08-31 6:01 ` Adrian Hunter [this message]
2017-09-02 5:09 ` Ritesh Harjani
2017-08-30 13:04 ` [RFC 2/4] mmc: sdhci-msm: Add CQHCI support for sdhci-msm Ritesh Harjani
2017-08-31 7:25 ` Adrian Hunter
2017-09-02 5:10 ` Ritesh Harjani
2017-08-30 13:04 ` [RFC 3/4] mmc: sdhci-msm: Change the desc_sz on cqe_enable/disable Ritesh Harjani
2017-08-31 6:42 ` Adrian Hunter
2017-09-02 5:12 ` Ritesh Harjani
2017-08-30 13:04 ` [RFC 4/4] mmc: sdhci-msm: Handle unexpected interrupt case on enabling legacy IRQs on CQE halt Ritesh Harjani
2017-08-31 7:35 ` Adrian Hunter
2017-09-02 5:13 ` Ritesh Harjani
2017-08-31 8:39 ` [RFC 0/4] mmc: sdhci-msm: Add CQE support for sdhci-msm Adrian Hunter
2017-09-02 5:16 ` Ritesh Harjani
-- strict thread matches above, loose matches on Subject: below --
2017-08-30 12:59 Ritesh Harjani
2017-08-30 12:59 ` [RFC 1/4] mmc: cqhci: Move CQHCI_ENABLE before setting TDLBA/TDLBAU Ritesh Harjani
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=82b52d84-6eb1-9f97-5e0a-bea6d25ddbda@intel.com \
--to=adrian.hunter@intel.com \
--cc=asutoshd@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=riteshh@codeaurora.org \
--cc=stummala@codeaurora.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