Re: [PATCH v9] mmc: support BKOPS feature for eMMC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

On 07/08/2012 07:13 PM, merez@xxxxxxxxxxxxxx wrote:

> 
> On Fri, July 6, 2012 9:47 am, Chris Ball wrote:
>> Hi,
>>
>> On Fri, Jun 08 2012, Jaehoon Chung wrote:
>>> Enable eMMC background operations (BKOPS) feature.
>>>
>>> If URGENT_BKOPS is set after a response, note that BKOPS
>>> are required. After all I/O requests are finished, run
>>> BKOPS if required. Should read/write operations be requested
>>> during BKOPS, first issue HPI to interrupt the ongoing BKOPS
>>> and then service the request.
>>> If BKOPS-STATUS is upper than LEVEL2, need to check until clear
>>> the BKOPS-STATUS vaule.
>>>
>>> If you want to enable this feature, set MMC_CAP2_BKOPS.
>>> And if you want to set the BKOPS_EN bit in ext_csd register,
>>> use the MMC_CAP2_INIT_BKOPS.
>> [..]
>>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>>> index 0707d22..d23caf2 100644
>>> --- a/include/linux/mmc/host.h
>>> +++ b/include/linux/mmc/host.h
>>> @@ -238,6 +238,8 @@ struct mmc_host {
>>>  #define MMC_CAP2_BROKEN_VOLTAGE	(1 << 7)	/* Use the broken voltage */
>>>  #define MMC_CAP2_DETECT_ON_ERR	(1 << 8)	/* On I/O err check card
>>> removal */
>>>  #define MMC_CAP2_HC_ERASE_SZ	(1 << 9)	/* High-capacity erase size */
>>> +#define MMC_CAP2_INIT_BKOPS	(1 << 10)	/* To enable BKOPS */
>>> +#define MMC_CAP2_BKOPS		(1 << 11)	/* BKOPS supported */
>>
>> Can we have a better explanation of how these capabilities are supposed
>> to be used, and why it's necessary to have two of them?  Why would you
>> set one but not the other?
>>
>> Thanks,
>>
>> - Chris.
>> --
>> Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
>> One Laptop Per Child
>>
> I think MMC_CAP2_BKOPS should be removed. If the card BKOPs were already
> enabled, the host must support BKOPs. Therefore, in mmc_start_bkops we
> should check only if card->ext_csd.bkops_en is set.

If bkops bit is set, it means that use the bkops by default.
If somebody didn't want to use the bkops, then just didn't set the MMC_CAP2_BKOPS.
And eMMC card's BKOPS bit should not be set,
then we can set the BKOPS support with switch command.
For this, MMC_CAP2_INIT_BKOPS is added.
In my case, didn't set the bkops enable bit at first time.
So need to set bkops enable bit with switch command.

As Maya's mentioned, if we use the bkops by default, we can remove the MMC_CAP2_BKOPS2.

Best Regards,
Jaehoon Chung

> 
> Thanks,
> Maya
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux