Re: [PATCH v8 1/2] mmc: add packed command feature of eMMC4.5

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

 



On Tue, Jul 10, 2012 at 11:24 AM, Chris Ball <cjb@xxxxxxxxxx> wrote:
> Hi,
>
> On Fri, Jun 29 2012, Seungwon Jeon wrote:
>> This patch adds packed command feature of eMMC4.5.
>> The maximum number for packing read(or write) is offered
>> and exception event relevant to packed command which is
>> used for error handling is enabled. If host wants to use
>> this feature, MMC_CAP2_PACKED_CMD should be set.
>>
>> Signed-off-by: Seungwon Jeon <tgih.jun@xxxxxxxxxxx>
>> Reviewed-by: Maya Erez <merez@xxxxxxxxxxxxxx>
>> Reviewed-by: Subhash Jadavani <subhashj@xxxxxxxxxxxxxx>
>> Reviewed-by: Namjae Jeon <linkinjeon@xxxxxxxxx>
>> ---
>>  drivers/mmc/core/mmc.c   |   25 +++++++++++++++++++++++++
>>  include/linux/mmc/card.h |    3 +++
>>  include/linux/mmc/host.h |    4 ++++
>>  include/linux/mmc/mmc.h  |   15 +++++++++++++++
>>  4 files changed, 47 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> index 258b203..bfb271f 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -516,6 +516,11 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
>>               } else {
>>                       card->ext_csd.data_tag_unit_size = 0;
>>               }
>> +
>> +             card->ext_csd.max_packed_writes =
>> +                     ext_csd[EXT_CSD_MAX_PACKED_WRITES];
>> +             card->ext_csd.max_packed_reads =
>> +                     ext_csd[EXT_CSD_MAX_PACKED_READS];
>>       } else {
>>               card->ext_csd.data_sector_size = 512;
>>       }
>> @@ -1246,6 +1251,26 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>>               }
>>       }
>>
>> +     if ((host->caps2 & MMC_CAP2_PACKED_WR &&
>> +                     card->ext_csd.max_packed_writes > 0) ||
>> +         (host->caps2 & MMC_CAP2_PACKED_RD &&
>> +                     card->ext_csd.max_packed_reads > 0)) {
>> +             err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
>> +                             EXT_CSD_EXP_EVENTS_CTRL,
>> +                             EXT_CSD_PACKED_EVENT_EN,
>> +                             card->ext_csd.generic_cmd6_time);
>
> Sorry, I don't have a copy of the eMMC 4.5 spec -- is PACKED_EVENT_EN
> a one-time programmable fuse on the eMMC, like BKOPS_ENABLE was?
>
It's not. PACKED_EVENT_EN is a bit set into EXCEPTION_EVENTS_CTRL
register, which is reset duing a power cycle
--
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