From: Jaehoon Chung <jh80.chung@samsung.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, addy ke <addy.ke@rock-chips.com>
Cc: Doug Anderson <dianders@chromium.org>,
Chris Ball <chris@printf.net>,
linux-mmc <linux-mmc@vger.kernel.org>,
"tgih.jun@samsung.com" <tgih.jun@samsung.com>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>
Subject: Re: [PATCH 1/2] mmc: core: use card pointer as the first parameter of execute_tuning()
Date: Thu, 05 Feb 2015 10:49:05 +0900 [thread overview]
Message-ID: <54D2CC11.6010403@samsung.com> (raw)
In-Reply-To: <CAPDyKFr-vjYP-hN7PvWx1NWaEh2Yi=fagkLJASkVemQXFXh6Zw@mail.gmail.com>
On 02/04/2015 09:54 PM, Ulf Hansson wrote:
> On 2 February 2015 at 10:02, addy ke <addy.ke@rock-chips.com> wrote:
>>
>>
>> On 2015/2/2 16:17, Ulf Hansson wrote:
>>> On 2 February 2015 at 09:16, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>>>>>
>>>>>> about bus_ops->alive, I think it can't use in tuning state.
>>>>>> Because:
>>>>>> bus_ops->alive() --> mmc_sd_alive(host) /* sd card */ -->mmc_send_status(host->card, NULL);
>>>>>> But host->card == NULL in tuning state(mmc_sd_init_card->mmc_sd_init_uhs_card).
>>>>>>
>>>>>> Only if sd is initialized successfully, we can get card pointer by host->card.
>>>>>> see: mmc_sd_init_card(drivers/mmc/core/sd.c), the end of this function: host->card = card
>>>>> And bus_ops->alive only check whether mmc is alive or not, the second parameter(*status) is NULL,
>>>>> We can not get the card status.
>>>>> But in tuning state, we need wait until card is idle, if the previous tuning is failed.
>>>>
>>>> You are right that we can't use bus_ops->alive() in its current form.
>>>> Changing it to take "card" and "status" as parameter should fix this
>>>> for us. My point was more that we can't use mmc_send_status() since
>>>> that doesn't work for SDIO.
>>
>> For sdio, I think maybe we can use CMD7 to get sdio status.
>>
>> And there are 3 file which need get card status at least:
>> 1. drivers/mmc/core/mmc_ops.c: mmc_send_status()
>> 2. drivers/mmc/card/block.c: get_card_status()
>> 3. drivers/mmc/card/mmc_test.c: mmc_test_wait_busy()
>> Maybe we need merge them and provide uniform interface for them.
>>
>>>>
>>>> Anyway, it seems like we need to put this patchset on hold for a while.
>>>>
>>>> You I merge the below patch instead so we at least have something
>>>
>>> /s /You / Should
>>>
>>>> working for 3.20?
>> This patch can work, but it need delay 10ms each tuning.
>> It is too slow to initialize the card(tuning time >= (10 * tuning_count) ms)
>
> Yes, it seems like it's not the perfect solution, but what options do
> we have right now? Leave it as is or should I apply below patch?
>
> Jaehoon, what's your view on this?
It's not the best solution, but if needs to use this, we need to apply the other approach in future.
Well, i'm working other job..I think i can start to work for dw-mmc on next-week.
I think good that the below patch should be merged at first.
Then try to find and discuss more generic solution, how about?
Best Regards,
Jaehoon Chung
>
>>>>
>>>> [PATCH] mmc: dw_mmc: rockchip: Add DW_MCI_QUIRK_RETRY_DELAY
>>>> https://lkml.org/lkml/2015/1/13/562
>>>>
>
> Kind regards
> Uffe
>
next prev parent reply other threads:[~2015-02-05 1:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 11:19 [PATCH 0/2] fix bug that cause tuning failure Addy Ke
2015-01-26 11:19 ` [PATCH 1/2] mmc: core: use card pointer as the first parameter of execute_tuning() Addy Ke
[not found] ` <1422271175-19445-2-git-send-email-addy.ke-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-01-26 15:15 ` Ulf Hansson
2015-01-26 17:45 ` Doug Anderson
2015-01-26 17:48 ` Russell King - ARM Linux
2015-01-27 15:18 ` Ulf Hansson
2015-01-29 0:55 ` Doug Anderson
2015-01-29 9:16 ` Ulf Hansson
2015-01-30 0:13 ` Doug Anderson
2015-01-30 1:08 ` addy ke
2015-02-02 7:38 ` addy ke
2015-02-02 8:16 ` Ulf Hansson
2015-02-02 8:17 ` Ulf Hansson
2015-02-02 9:02 ` addy ke
2015-02-04 12:54 ` Ulf Hansson
2015-02-05 1:49 ` Jaehoon Chung [this message]
2015-01-30 2:15 ` Jaehoon Chung
2015-01-31 1:08 ` Doug Anderson
2015-01-26 11:19 ` [PATCH 2/2] mmc: dw_mmc: wait until card ready if tuning fails Addy Ke
2015-01-29 8:45 ` 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=54D2CC11.6010403@samsung.com \
--to=jh80.chung@samsung.com \
--cc=addy.ke@rock-chips.com \
--cc=chris@printf.net \
--cc=dianders@chromium.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=tgih.jun@samsung.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