mmc: block: Add quirk and increase read data timeout for hynix emmc
Hynix emmc cards are causing read data timeout. Increase timeout value to max of 4sec and add card quirk for all Hynix emmc cards. Change-Id: I78637dc787964ec5cafe297587d6a12ecf1d31c6 Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This commit is contained in:
parent
a1202f10d9
commit
e4db7c6cf6
3 changed files with 11 additions and 1 deletions
|
@ -4110,6 +4110,13 @@ static const struct mmc_fixup blk_fixups[] =
|
|||
MMC_FIXUP("Q7XSAB", CID_MANFID_SAMSUNG, 0x100, add_quirk_mmc,
|
||||
MMC_QUIRK_LONG_READ_TIME),
|
||||
|
||||
/*
|
||||
* Hynix eMMC cards need longer data read timeout than
|
||||
* indicated in CSD.
|
||||
*/
|
||||
MMC_FIXUP(CID_NAME_ANY, CID_MANFID_HYNIX, CID_OEMID_ANY, add_quirk_mmc,
|
||||
MMC_QUIRK_LONG_READ_TIME),
|
||||
|
||||
/*
|
||||
* On these Samsung MoviNAND parts, performing secure erase or
|
||||
* secure trim can result in unrecoverable corruption due to a
|
||||
|
|
|
@ -1962,9 +1962,11 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card)
|
|||
* Address this by setting the read timeout to a "reasonably high"
|
||||
* value. For the cards tested, 300ms has proven enough. If necessary,
|
||||
* this value can be increased if other problematic cards require this.
|
||||
* Certain Hynix 5.x cards giving read timeout even with 300ms.
|
||||
* Increasing further to max value (4s).
|
||||
*/
|
||||
if (mmc_card_long_read_time(card) && data->flags & MMC_DATA_READ) {
|
||||
data->timeout_ns = 300000000;
|
||||
data->timeout_ns = 4000000000u;
|
||||
data->timeout_clks = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -486,6 +486,7 @@ struct mmc_fixup {
|
|||
#define CID_MANFID_MICRON 0x13
|
||||
#define CID_MANFID_SAMSUNG 0x15
|
||||
#define CID_MANFID_KINGSTON 0x70
|
||||
#define CID_MANFID_HYNIX 0x90
|
||||
|
||||
#define CID_MANFID_ANY (-1u)
|
||||
#define CID_OEMID_ANY ((unsigned short) -1)
|
||||
|
|
Loading…
Add table
Reference in a new issue