From: James Hogan <james.hogan@imgtec.com>
To: Seungwon Jeon <tgih.jun@samsung.com>
Cc: linux-mmc@vger.kernel.org, 'Chris Ball' <cjb@laptop.org>,
'Will Newton' <will.newton@imgtec.com>,
'Jaehoon Chung' <jh80.chung@samsung.com>
Subject: Re: [PATCH 2/2] mmc: dw_mmc: make sure of clearing HLE interrupt
Date: Wed, 28 Nov 2012 10:45:12 +0000 [thread overview]
Message-ID: <50B5EB38.9030401@imgtec.com> (raw)
In-Reply-To: <001c01cdcd52$e58a2260$b09e6720$%jun@samsung.com>
Hi,
On 28/11/12 10:26, Seungwon Jeon wrote:
> Even though HLE interrupt is enabled, there is no touch.
> This patch clears HLE interrupt which is not unhandled.
It's not entirely clear from this description what the patch is trying
to do. I presume from the patch you're trying to say something like:
"Even though the HLE interrupt is enabled, it isn't handled, so handle
the HLE interrupt by printing an error message."
According to the TRM though, in the section Error Handling (HLE is also
mentioned elsewhere):
> Hardware locked error – Set when the DWC_mobile_storage cannot load a command issued by
> software. When software sets the start_cmd bit in the CMD register, the DWC_mobile_storage tries
> to load the command. If the command buffer is already filled with a command, this error is raised.
> The software then has to reload the command.
So it sounds like the last command should be reloaded (either on
interrupt or the interrupt status should be checked after starting a
command). Is this done elsewhere already?
Cheers
James
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
> drivers/mmc/host/dw_mmc.c | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 6785d62..b6db0ae 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1009,6 +1009,11 @@ static void dw_mci_tasklet_func(unsigned long priv)
> state = host->state;
> data = host->data;
>
> + if (host->cmd_status & SDMMC_INT_HLE) {
> + dev_err(host->dev, "hardware locked write error\n");
> + goto unlock;
> + }
> +
> do {
> prev_state = state;
>
> @@ -1577,6 +1582,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
> if (!pending)
> break;
>
> + if (pending & SDMMC_INT_HLE) {
> + mci_writel(host, RINTSTS, SDMMC_INT_HLE);
> + host->cmd_status = pending;
> + tasklet_schedule(&host->tasklet);
> + }
> +
> if (pending & DW_MCI_CMD_ERROR_FLAGS) {
> mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS);
> host->cmd_status = pending;
>
next prev parent reply other threads:[~2012-11-28 10:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 10:26 [PATCH 2/2] mmc: dw_mmc: make sure of clearing HLE interrupt Seungwon Jeon
2012-11-28 10:45 ` James Hogan [this message]
2012-11-29 7:35 ` Seungwon Jeon
2012-11-29 14:59 ` Jae hoon Chung
2012-11-30 11:49 ` Seungwon Jeon
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=50B5EB38.9030401@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=cjb@laptop.org \
--cc=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=tgih.jun@samsung.com \
--cc=will.newton@imgtec.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.