public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] How working MMC_BUS_WIDTH_TEST??
@ 2011-06-28 10:54 Jaehoon Chung
  2011-06-28 19:50 ` Philip Rakity
  0 siblings, 1 reply; 5+ messages in thread
From: Jaehoon Chung @ 2011-06-28 10:54 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, Philip Rakity, Kyungmin Park

Hi..

I found the MMC_CAP_BUS_WIDTH_TEST...
In mailing, I read the related patches..
but i didn't fully understand...

/*
 * If controller can't handle bus width test,
 * compare ext_csd previously read in 1 bit mode
 * against ext_csd at new bus width
 */
if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST))
	err = mmc_compare_ext_csds(card,
		ext_csd,
		bus_width);
else
	err = mmc_bus_test(card, bus_width);
if (!err)
	break;

And i tested suspend/resume..it's failed..
If i didn't set MMC_CAP_BUS_WIDTH_TEST, always return -EINVAL..
(using SDHCI controller, card is eMMC4.41)

Didn't compare ext_csd's value..

So i want to know how use MMC_CAP_BUS_WIDTH_TEST..

Thanks,
Jaehoon Chung

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

* Re: [RFC] How working MMC_BUS_WIDTH_TEST??
  2011-06-28 10:54 [RFC] How working MMC_BUS_WIDTH_TEST?? Jaehoon Chung
@ 2011-06-28 19:50 ` Philip Rakity
  2011-06-29  4:42   ` Jaehoon Chung
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Rakity @ 2011-06-28 19:50 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Chris Ball, Kyungmin Park


On Jun 28, 2011, at 3:54 AM, Jaehoon Chung wrote:

> Hi..
> 
> I found the MMC_CAP_BUS_WIDTH_TEST...
> In mailing, I read the related patches..
> but i didn't fully understand...
> 
> /*
> * If controller can't handle bus width test,
> * compare ext_csd previously read in 1 bit mode
> * against ext_csd at new bus width
> */
> if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST))
> 	err = mmc_compare_ext_csds(card,
> 		ext_csd,
> 		bus_width);
> else
> 	err = mmc_bus_test(card, bus_width);
> if (!err)
> 	break;
> 
> And i tested suspend/resume..it's failed..
> If i didn't set MMC_CAP_BUS_WIDTH_TEST, always return -EINVAL..
> (using SDHCI controller, card is eMMC4.41)
> 
> Didn't compare ext_csd's value..
> 
> So i want to know how use MMC_CAP_BUS_WIDTH_TEST..

I am using eMMC and code works fine so  maybe there is issue in no ext_csd.  You will need to
add debug code to the compare_ext_csd and see what is not right and we can adjust the code.
I am surprised that resume fails -- code will default to 1 bit data and it is NOT possible for this to
be wrong.  At the moment -- clueless to explain with more information.

TheCMD14/ CMD19 is in JEDEC spec for bus width testing.  Sends a pattern to the card and
based on the returned values detects the bus width.  Some controllers do NOT support this command.
The just do not work.  You need to figure this out by enabling the quirk.  No other way to know.

regards,

Philip

> 
> Thanks,
> Jaehoon Chung


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

* Re: [RFC] How working MMC_BUS_WIDTH_TEST??
  2011-06-28 19:50 ` Philip Rakity
@ 2011-06-29  4:42   ` Jaehoon Chung
  2011-06-29  4:46     ` Philip Rakity
  0 siblings, 1 reply; 5+ messages in thread
From: Jaehoon Chung @ 2011-06-29  4:42 UTC (permalink / raw)
  To: Philip Rakity
  Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Chris Ball,
	Kyungmin Park

Philip Rakity wrote:
> On Jun 28, 2011, at 3:54 AM, Jaehoon Chung wrote:
> 
>> Hi..
>>
>> I found the MMC_CAP_BUS_WIDTH_TEST...
>> In mailing, I read the related patches..
>> but i didn't fully understand...
>>
>> /*
>> * If controller can't handle bus width test,
>> * compare ext_csd previously read in 1 bit mode
>> * against ext_csd at new bus width
>> */
>> if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST))
>> 	err = mmc_compare_ext_csds(card,
>> 		ext_csd,
>> 		bus_width);
>> else
>> 	err = mmc_bus_test(card, bus_width);
>> if (!err)
>> 	break;
>>
>> And i tested suspend/resume..it's failed..
>> If i didn't set MMC_CAP_BUS_WIDTH_TEST, always return -EINVAL..
>> (using SDHCI controller, card is eMMC4.41)
>>
>> Didn't compare ext_csd's value..
>>
>> So i want to know how use MMC_CAP_BUS_WIDTH_TEST..
> 
> I am using eMMC and code works fine so  maybe there is issue in no ext_csd.  You will need to
> add debug code to the compare_ext_csd and see what is not right and we can adjust the code.
> I am surprised that resume fails -- code will default to 1 bit data and it is NOT possible for this to
> be wrong.  At the moment -- clueless to explain with more information.
> 
> TheCMD14/ CMD19 is in JEDEC spec for bus width testing.  Sends a pattern to the card and
> based on the returned values detects the bus width.  Some controllers do NOT support this command.
> The just do not work.  You need to figure this out by enabling the quirk.  No other way to know.

When card is probing, i think that need to test bus-width.
If card is non-removable, unnecessary bus_width test during resuming.
Because already know that support n-bit bus-width..how about this?

> 
> regards,
> 
> Philip
> 
>> Thanks,
>> 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
> 


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

* Re: [RFC] How working MMC_BUS_WIDTH_TEST??
  2011-06-29  4:42   ` Jaehoon Chung
@ 2011-06-29  4:46     ` Philip Rakity
  2011-06-30  2:12       ` Jaehoon Chung
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Rakity @ 2011-06-29  4:46 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Chris Ball, Kyungmin Park


On Jun 28, 2011, at 9:42 PM, Jaehoon Chung wrote:

> Philip Rakity wrote:
>> On Jun 28, 2011, at 3:54 AM, Jaehoon Chung wrote:
>> 
>>> Hi..
>>> 
>>> I found the MMC_CAP_BUS_WIDTH_TEST...
>>> In mailing, I read the related patches..
>>> but i didn't fully understand...
>>> 
>>> /*
>>> * If controller can't handle bus width test,
>>> * compare ext_csd previously read in 1 bit mode
>>> * against ext_csd at new bus width
>>> */
>>> if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST))
>>> 	err = mmc_compare_ext_csds(card,
>>> 		ext_csd,
>>> 		bus_width);
>>> else
>>> 	err = mmc_bus_test(card, bus_width);
>>> if (!err)
>>> 	break;
>>> 
>>> And i tested suspend/resume..it's failed..
>>> If i didn't set MMC_CAP_BUS_WIDTH_TEST, always return -EINVAL..
>>> (using SDHCI controller, card is eMMC4.41)
>>> 
>>> Didn't compare ext_csd's value..
>>> 
>>> So i want to know how use MMC_CAP_BUS_WIDTH_TEST..
>> 
>> I am using eMMC and code works fine so  maybe there is issue in no ext_csd.  You will need to
>> add debug code to the compare_ext_csd and see what is not right and we can adjust the code.
>> I am surprised that resume fails -- code will default to 1 bit data and it is NOT possible for this to
>> be wrong.  At the moment -- clueless to explain with more information.
>> 
>> TheCMD14/ CMD19 is in JEDEC spec for bus width testing.  Sends a pattern to the card and
>> based on the returned values detects the bus width.  Some controllers do NOT support this command.
>> The just do not work.  You need to figure this out by enabling the quirk.  No other way to know.
> 
> When card is probing, i think that need to test bus-width.
> If card is non-removable, unnecessary bus_width test during resuming.

agree not necessary but does not explain error.


> Because already know that support n-bit bus-width..how about this?
> 
>> 
>> regards,
>> 
>> Philip
>> 
>>> Thanks,
>>> 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
>> 
> 


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

* Re: [RFC] How working MMC_BUS_WIDTH_TEST??
  2011-06-29  4:46     ` Philip Rakity
@ 2011-06-30  2:12       ` Jaehoon Chung
  0 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2011-06-30  2:12 UTC (permalink / raw)
  To: Philip Rakity
  Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Chris Ball,
	Kyungmin Park

Hi Philip..

If i didn't set MMC_CAP_BUS_WIDTH_TEST,
entered mmc_compare_ext_csds(). right?

i understand that mmc_compare_ext_csds() compared with previously ext_csd.
But in source code, always previously ext_csd is NULL.

I didn't find where assigned ext_csd..

I think that need to assign ext_csd..

If my point is right, i will send the patch..

Thanks
Jaehoon Chung

Philip Rakity wrote:
> On Jun 28, 2011, at 9:42 PM, Jaehoon Chung wrote:
> 
>> Philip Rakity wrote:
>>> On Jun 28, 2011, at 3:54 AM, Jaehoon Chung wrote:
>>>
>>>> Hi..
>>>>
>>>> I found the MMC_CAP_BUS_WIDTH_TEST...
>>>> In mailing, I read the related patches..
>>>> but i didn't fully understand...
>>>>
>>>> /*
>>>> * If controller can't handle bus width test,
>>>> * compare ext_csd previously read in 1 bit mode
>>>> * against ext_csd at new bus width
>>>> */
>>>> if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST))
>>>> 	err = mmc_compare_ext_csds(card,
>>>> 		ext_csd,
>>>> 		bus_width);
>>>> else
>>>> 	err = mmc_bus_test(card, bus_width);
>>>> if (!err)
>>>> 	break;
>>>>
>>>> And i tested suspend/resume..it's failed..
>>>> If i didn't set MMC_CAP_BUS_WIDTH_TEST, always return -EINVAL..
>>>> (using SDHCI controller, card is eMMC4.41)
>>>>
>>>> Didn't compare ext_csd's value..
>>>>
>>>> So i want to know how use MMC_CAP_BUS_WIDTH_TEST..
>>> I am using eMMC and code works fine so  maybe there is issue in no ext_csd.  You will need to
>>> add debug code to the compare_ext_csd and see what is not right and we can adjust the code.
>>> I am surprised that resume fails -- code will default to 1 bit data and it is NOT possible for this to
>>> be wrong.  At the moment -- clueless to explain with more information.
>>>
>>> TheCMD14/ CMD19 is in JEDEC spec for bus width testing.  Sends a pattern to the card and
>>> based on the returned values detects the bus width.  Some controllers do NOT support this command.
>>> The just do not work.  You need to figure this out by enabling the quirk.  No other way to know.
>> When card is probing, i think that need to test bus-width.
>> If card is non-removable, unnecessary bus_width test during resuming.
> 
> agree not necessary but does not explain error.
> 
> 
>> Because already know that support n-bit bus-width..how about this?
>>
>>> regards,
>>>
>>> Philip
>>>
>>>> Thanks,
>>>> 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
>>>
> 
> --
> 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
> 


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

end of thread, other threads:[~2011-06-30  2:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-28 10:54 [RFC] How working MMC_BUS_WIDTH_TEST?? Jaehoon Chung
2011-06-28 19:50 ` Philip Rakity
2011-06-29  4:42   ` Jaehoon Chung
2011-06-29  4:46     ` Philip Rakity
2011-06-30  2:12       ` Jaehoon Chung

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