mmc: core: set MMC_PM_KEEP_POWER for certain Hynix mmc cards
Certain Hynix eMMC 5.0 cards might reach a fast EOL if the card's power is disabled between CMD5 and CMD0 (power off during reset). This patch sets the MMC_PM_KEEP_POWER flag to indicate that the card's power should be retained for suspend/resume sequences. Change-Id: I4bcc0f4bfd608745626816ca261369b432602c45 Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
This commit is contained in:
parent
8ee51daf1c
commit
d25b9c4733
2 changed files with 13 additions and 0 deletions
|
@ -126,6 +126,12 @@ static void mmc_set_erase_size(struct mmc_card *card)
|
|||
mmc_init_erase(card);
|
||||
}
|
||||
|
||||
static void add_pm_flag_mmc(struct mmc_card *card, int data)
|
||||
{
|
||||
if (mmc_card_mmc(card))
|
||||
card->host->pm_flags |= data;
|
||||
}
|
||||
|
||||
static const struct mmc_fixup mmc_fixups[] = {
|
||||
|
||||
/* avoid HPI for specific cards */
|
||||
|
@ -136,6 +142,9 @@ static const struct mmc_fixup mmc_fixups[] = {
|
|||
MMC_FIXUP("MMC16G", CID_MANFID_KINGSTON, CID_OEMID_ANY,
|
||||
add_quirk_mmc, MMC_QUIRK_CACHE_DISABLE),
|
||||
|
||||
MMC_FIXUP_EXT_CSD_REV(CID_NAME_ANY, CID_MANFID_HYNIX, CID_OEMID_ANY,
|
||||
add_pm_flag_mmc, MMC_PM_KEEP_POWER, MMC_V5_0),
|
||||
|
||||
END_FIXUP
|
||||
};
|
||||
|
||||
|
@ -382,6 +391,9 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
|||
*/
|
||||
card->ext_csd.rev = ext_csd[EXT_CSD_REV];
|
||||
|
||||
/* fixup device after ext_csd revision field is updated */
|
||||
mmc_fixup_device(card, mmc_fixups);
|
||||
|
||||
card->ext_csd.raw_sectors[0] = ext_csd[EXT_CSD_SEC_CNT + 0];
|
||||
card->ext_csd.raw_sectors[1] = ext_csd[EXT_CSD_SEC_CNT + 1];
|
||||
card->ext_csd.raw_sectors[2] = ext_csd[EXT_CSD_SEC_CNT + 2];
|
||||
|
|
|
@ -472,6 +472,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