public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
@ 2013-04-06 10:15 Jagan Teki
  0 siblings, 0 replies; 9+ messages in thread
From: Jagan Teki @ 2013-04-06 10:15 UTC (permalink / raw)
  To: u-boot

Hi,

I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca

I need few quires regarding the QUIRK delay.
1. Why the delay is 1000
+       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
+               udelay(1000);
+
2. is this delay specific to s5p_sdhci  controller?
3. I have an issue "Controller never released inhibit bit(s)"
   but when I enable this quirk on my driver with udelay(10000), it's working.

Could you please help me.

Thanks,
Jagan.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
@ 2013-04-07  4:57 Jagan Teki
  2013-04-08  3:52 ` Tushar Behera
  0 siblings, 1 reply; 9+ messages in thread
From: Jagan Teki @ 2013-04-07  4:57 UTC (permalink / raw)
  To: u-boot

Hi,

I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca

I need few quires regarding the QUIRK delay.
1. Why the delay is 1000
+       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
+               udelay(1000);
+
2. is this delay specific to s5p_sdhci  controller?
3. I have an issue "Controller never released inhibit bit(s)"
   but when I enable this quirk on my driver with udelay(10000), it's
working.

Could you please help me.

Thanks,
Jagan.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
  2013-04-07  4:57 [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd Jagan Teki
@ 2013-04-08  3:52 ` Tushar Behera
  2013-04-08  4:07   ` Jaehoon Chung
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tushar Behera @ 2013-04-08  3:52 UTC (permalink / raw)
  To: u-boot

On 04/07/2013 10:27 AM, Jagan Teki wrote:
> Hi,
> 
> I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca
> 
> I need few quires regarding the QUIRK delay.
> 1. Why the delay is 1000
> +       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
> +               udelay(1000);
> +
> 2. is this delay specific to s5p_sdhci  controller?

This was specific to s5p_sdhci driver so as to replicate the behavior of
s5p_mmc driver.

> 3. I have an issue "Controller never released inhibit bit(s)"
>    but when I enable this quirk on my driver with udelay(10000), it's
> working.

I am not sure about the exact delay as per the spec. I have added
Jaehoon to CC who might have additional information about this.

> 
> Could you please help me.
> 
> Thanks,
> Jagan.
> 


-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
  2013-04-08  3:52 ` Tushar Behera
@ 2013-04-08  4:07   ` Jaehoon Chung
  2013-04-08  7:35     ` Lukasz Majewski
  2013-04-08 17:58   ` Jagan Teki
  2013-04-09  9:41   ` Jagan Teki
  2 siblings, 1 reply; 9+ messages in thread
From: Jaehoon Chung @ 2013-04-08  4:07 UTC (permalink / raw)
  To: u-boot

Hi,

On 04/08/2013 12:52 PM, Tushar Behera wrote:
> On 04/07/2013 10:27 AM, Jagan Teki wrote:
>> Hi,
>>
>> I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
>> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca
>>
>> I need few quires regarding the QUIRK delay.
>> 1. Why the delay is 1000
>> +       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
>> +               udelay(1000);
>> +
>> 2. is this delay specific to s5p_sdhci  controller?
> 
> This was specific to s5p_sdhci driver so as to replicate the behavior of
> s5p_mmc driver.
It didn't be denoted to use the udelay(1000) in spec.
But To ensure the completing previous request, it has added the udelay(1000).
> 
>> 3. I have an issue "Controller never released inhibit bit(s)"
>>    but when I enable this quirk on my driver with udelay(10000), it's
>> working.
udelay(10000)? It's too long delay time for completing the request.
Which SoC do you use?

If we can use the get_timer() for busy-waiting, i think that we can remove the udelay().

Best Regards,
Jaehoon Chung
> 
> I am not sure about the exact delay as per the spec. I have added
> Jaehoon to CC who might have additional information about this.
> 
>>
>> Could you please help me.
>>
>> Thanks,
>> Jagan.
>>
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
  2013-04-08  4:07   ` Jaehoon Chung
@ 2013-04-08  7:35     ` Lukasz Majewski
  0 siblings, 0 replies; 9+ messages in thread
From: Lukasz Majewski @ 2013-04-08  7:35 UTC (permalink / raw)
  To: u-boot

Dear All,


> Hi,
> 
> On 04/08/2013 12:52 PM, Tushar Behera wrote:
> > On 04/07/2013 10:27 AM, Jagan Teki wrote:
> >> Hi,
> >>
> >> I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on
> >> below commit
> >> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca
> >>
> >> I need few quires regarding the QUIRK delay.
> >> 1. Why the delay is 1000
> >> +       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
> >> +               udelay(1000);
> >> +
> >> 2. is this delay specific to s5p_sdhci  controller?
> > 
> > This was specific to s5p_sdhci driver so as to replicate the
> > behavior of s5p_mmc driver.
> It didn't be denoted to use the udelay(1000) in spec.
> But To ensure the completing previous request, it has added the
> udelay(1000).

But with some memory chips/workloads this udelay is indeed too short
and "Controller never released inhibit bit(s)" appears.

> > 
> >> 3. I have an issue "Controller never released inhibit bit(s)"
> >>    but when I enable this quirk on my driver with udelay(10000),
> >> it's working.
> udelay(10000)? It's too long delay time for completing the request.

When I recently has been experimenting with ext4 it turned out, that for
some load this value is not enough. Moreover I'm not quite sure if
after several such errors we can still count that sent data are really
stored on the chip.

> Which SoC do you use?
> 
> If we can use the get_timer() for busy-waiting, i think that we can
> remove the udelay().

I think that we shall try to improve the sdhci framework instead. 

I've described this problem some time ago, but no relevant solution was
devised:

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/150636/match=rfc+mmc+fix+increase+timeout+value+sdhci_send_command

Maybe now we can come up with some solution.

> 
> Best Regards,
> Jaehoon Chung
> > 
> > I am not sure about the exact delay as per the spec. I have added
> > Jaehoon to CC who might have additional information about this.
> > 
> >>
> >> Could you please help me.
> >>
> >> Thanks,
> >> Jagan.
> >>
> > 
> > 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



-- 
Best regards,

Lukasz Majewski

Samsung R&D Poland (SRPOL) | Linux Platform Group

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
  2013-04-08  3:52 ` Tushar Behera
  2013-04-08  4:07   ` Jaehoon Chung
@ 2013-04-08 17:58   ` Jagan Teki
  2013-04-09  9:41   ` Jagan Teki
  2 siblings, 0 replies; 9+ messages in thread
From: Jagan Teki @ 2013-04-08 17:58 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 8, 2013 at 9:22 AM, Tushar Behera <tushar.behera@linaro.org> wrote:
> On 04/07/2013 10:27 AM, Jagan Teki wrote:
>> Hi,
>>
>> I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
>> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca
>>
>> I need few quires regarding the QUIRK delay.
>> 1. Why the delay is 1000
>> +       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
>> +               udelay(1000);
>> +
>> 2. is this delay specific to s5p_sdhci  controller?
>
> This was specific to s5p_sdhci driver so as to replicate the behavior of
> s5p_mmc driver.

May be you can give the QUIRK which includes s5p as it specific to
this driver, i may be incorrect.

Thanks,
Jagan.

>
>> 3. I have an issue "Controller never released inhibit bit(s)"
>>    but when I enable this quirk on my driver with udelay(10000), it's
>> working.
>
> I am not sure about the exact delay as per the spec. I have added
> Jaehoon to CC who might have additional information about this.
>
>>
>> Could you please help me.
>>
>> Thanks,
>> Jagan.
>>
>
>
> --
> Tushar Behera

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
  2013-04-08  3:52 ` Tushar Behera
  2013-04-08  4:07   ` Jaehoon Chung
  2013-04-08 17:58   ` Jagan Teki
@ 2013-04-09  9:41   ` Jagan Teki
  2013-04-09  9:53     ` Jaehoon Chung
  2 siblings, 1 reply; 9+ messages in thread
From: Jagan Teki @ 2013-04-09  9:41 UTC (permalink / raw)
  To: u-boot

Hi Tushar,

On Mon, Apr 8, 2013 at 9:22 AM, Tushar Behera <tushar.behera@linaro.org> wrote:
> On 04/07/2013 10:27 AM, Jagan Teki wrote:
>> Hi,
>>
>> I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
>> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca
>>
>> I need few quires regarding the QUIRK delay.
>> 1. Why the delay is 1000
>> +       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
>> +               udelay(1000);
>> +
>> 2. is this delay specific to s5p_sdhci  controller?
>

BTW:
Can you please help me out what is the reason for max and min clocks
are at 52000000 and 400000 respectively.

As per my knowledge the max clock of sdhci on spec-2 is 50000000
(50Mhz), I may be in correct.

Request for your help.

Thanks,
Jagan.

> This was specific to s5p_sdhci driver so as to replicate the behavior of
> s5p_mmc driver.
>
>> 3. I have an issue "Controller never released inhibit bit(s)"
>>    but when I enable this quirk on my driver with udelay(10000), it's
>> working.
>
> I am not sure about the exact delay as per the spec. I have added
> Jaehoon to CC who might have additional information about this.
>
>>
>> Could you please help me.
>>
>> Thanks,
>> Jagan.
>>
>
>
> --
> Tushar Behera

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
  2013-04-09  9:41   ` Jagan Teki
@ 2013-04-09  9:53     ` Jaehoon Chung
  2013-04-09 10:34       ` Jagan Teki
  0 siblings, 1 reply; 9+ messages in thread
From: Jaehoon Chung @ 2013-04-09  9:53 UTC (permalink / raw)
  To: u-boot

On 04/09/2013 06:41 PM, Jagan Teki wrote:
> Hi Tushar,
> 
> On Mon, Apr 8, 2013 at 9:22 AM, Tushar Behera <tushar.behera@linaro.org> wrote:
>> On 04/07/2013 10:27 AM, Jagan Teki wrote:
>>> Hi,
>>>
>>> I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
>>> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca
>>>
>>> I need few quires regarding the QUIRK delay.
>>> 1. Why the delay is 1000
>>> +       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
>>> +               udelay(1000);
>>> +
>>> 2. is this delay specific to s5p_sdhci  controller?
>>
> 
> BTW:
> Can you please help me out what is the reason for max and min clocks
> are at 52000000 and 400000 respectively.
> 
> As per my knowledge the max clock of sdhci on spec-2 is 50000000
> (50Mhz), I may be in correct.
Right..But eMMC can use up to 52MHz.
And see into the drivers/mmc/mmc.c..SD-card's max_dtr is set to 50MHz, if card is supported HS_MODE.
> 
> Request for your help.
> 
> Thanks,
> Jagan.
> 
>> This was specific to s5p_sdhci driver so as to replicate the behavior of
>> s5p_mmc driver.
>>
>>> 3. I have an issue "Controller never released inhibit bit(s)"
>>>    but when I enable this quirk on my driver with udelay(10000), it's
>>> working.
>>
>> I am not sure about the exact delay as per the spec. I have added
>> Jaehoon to CC who might have additional information about this.
>>
>>>
>>> Could you please help me.
>>>
>>> Thanks,
>>> Jagan.
>>>
>>
>>
>> --
>> Tushar Behera
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd
  2013-04-09  9:53     ` Jaehoon Chung
@ 2013-04-09 10:34       ` Jagan Teki
  0 siblings, 0 replies; 9+ messages in thread
From: Jagan Teki @ 2013-04-09 10:34 UTC (permalink / raw)
  To: u-boot

Hi Tushar,

On Tue, Apr 9, 2013 at 3:23 PM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> On 04/09/2013 06:41 PM, Jagan Teki wrote:
>> Hi Tushar,
>>
>> On Mon, Apr 8, 2013 at 9:22 AM, Tushar Behera <tushar.behera@linaro.org> wrote:
>>> On 04/07/2013 10:27 AM, Jagan Teki wrote:
>>>> Hi,
>>>>
>>>> I saw that you have been added the SDHCI_QUIRK_WAIT_SEND_CMD on below commit
>>>> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=13243f2eafc4292917178051fe1bb5aab2774dca
>>>>
>>>> I need few quires regarding the QUIRK delay.
>>>> 1. Why the delay is 1000
>>>> +       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
>>>> +               udelay(1000);
>>>> +
>>>> 2. is this delay specific to s5p_sdhci  controller?
>>>
>>
>> BTW:
>> Can you please help me out what is the reason for max and min clocks
>> are at 52000000 and 400000 respectively.
>>
>> As per my knowledge the max clock of sdhci on spec-2 is 50000000
>> (50Mhz), I may be in correct.
> Right..But eMMC can use up to 52MHz.
> And see into the drivers/mmc/mmc.c..SD-card's max_dtr is set to 50MHz, if card is supported HS_MODE.

Ok, Thanks for your information.
means the max_clk 52MHz will handle eMMC as well.. is it?
What is this min_clk as 400000?
Any idea if the max_clk and min_clk value are initialized to 0 so-that
sdhci will re-init based on the  capabilities register
Base_Clock_Frequency_for_SD_Clock[13:8].?

Thanks,
Jagan.

>>
>> Request for your help.
>>
>> Thanks,
>> Jagan.
>>
>>> This was specific to s5p_sdhci driver so as to replicate the behavior of
>>> s5p_mmc driver.
>>>
>>>> 3. I have an issue "Controller never released inhibit bit(s)"
>>>>    but when I enable this quirk on my driver with udelay(10000), it's
>>>> working.
>>>
>>> I am not sure about the exact delay as per the spec. I have added
>>> Jaehoon to CC who might have additional information about this.
>>>
>>>>
>>>> Could you please help me.
>>>>
>>>> Thanks,
>>>> Jagan.
>>>>
>>>
>>>
>>> --
>>> Tushar Behera
>>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-04-09 10:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-07  4:57 [U-Boot] mmc: sdhci: Add a quirk to add delay during completion of sdhci_send_cmd Jagan Teki
2013-04-08  3:52 ` Tushar Behera
2013-04-08  4:07   ` Jaehoon Chung
2013-04-08  7:35     ` Lukasz Majewski
2013-04-08 17:58   ` Jagan Teki
2013-04-09  9:41   ` Jagan Teki
2013-04-09  9:53     ` Jaehoon Chung
2013-04-09 10:34       ` Jagan Teki
  -- strict thread matches above, loose matches on Subject: below --
2013-04-06 10:15 Jagan Teki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox