From: Jaehoon Chung <jh80.chung@samsung.com>
To: Will Newton <will.newton@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
linux-mmc <linux-mmc@vger.kernel.org>,
Chris Ball <cjb@laptop.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
Will Newton <will.newton@imgtec.com>,
James Hogan <james.hogan@imgtec.com>
Subject: Re: [PATCH 2/5] mmc: dw-mmc: ensure that the card is not busy when changing clock.
Date: Thu, 23 Aug 2012 22:26:58 +0900 [thread overview]
Message-ID: <50362FA1.6010005@samsung.com> (raw)
In-Reply-To: <CAFbHwiRm3niUF+Kds0-+XOUzCu8F5hkY9NJi+jKg_PtFrhQ+CQ@mail.gmail.com>
On 08/23/2012 09:33 PM, Will Newton wrote:
> On Thu, Aug 23, 2012 at 12:31 PM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> To avoid glitches in the card clock output,
>> need to check whether card is busy or not.
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>> drivers/mmc/host/dw_mmc.c | 30 ++++++++++++++++++++++++------
>> drivers/mmc/host/dw_mmc.h | 1 +
>> 2 files changed, 25 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>> index 36f98c0..8bef3c2 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -623,6 +623,27 @@ static void mci_send_cmd(struct dw_mci_slot *slot, u32 cmd, u32 arg)
>> cmd, arg, cmd_status);
>> }
>>
>> +static void dw_mci_inform_ciu(struct dw_mci_slot *slot)
>> +{
>> + struct dw_mci *host = slot->host;
>> + unsigned long timeout = jiffies + msecs_to_jiffies(500);
>
> Is there a reason why this timeout value was chosen? It seems quite long.
There is no special reason. I will fix it with more reasonable value.
>
>> + u32 ctrl, status;
>> +
>> + do {
>> + status = mci_readl(host, STATUS);
>> + if (!(status & SDMMC_DATA_BUSY))
>> + break;
>> + ctrl = mci_readl(host, CTRL);
>> + ctrl |= SDMMC_CTRL_RESET;
>> + mci_writel(host, CTRL, ctrl);
>> + } while (time_before(jiffies, timeout));
>> +
>> + if (status & SDMMC_DATA_BUSY)
>> + dev_err(&slot->mmc->class_dev,"Card is busy..!\n");
>
> The two periods in this message do not need to be there.
Will fix.
Best Regards,
Jaehoon Chung
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-08-23 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 11:31 [PATCH 2/5] mmc: dw-mmc: ensure that the card is not busy when changing clock Jaehoon Chung
2012-08-23 12:33 ` Will Newton
2012-08-23 13:26 ` Jaehoon Chung [this message]
2012-08-24 3:55 ` Seungwon Jeon
2012-08-24 4:52 ` Jaehoon Chung
2012-08-27 1:38 ` Seungwon Jeon
2012-08-27 1:51 ` Jaehoon Chung
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=50362FA1.6010005@samsung.com \
--to=jh80.chung@samsung.com \
--cc=cjb@laptop.org \
--cc=james.hogan@imgtec.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=will.newton@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox