Commit efff8e78 authored by Uri Yanai's avatar Uri Yanai Committed by Ulf Hansson

mmc: Adding AUTO_BKOPS_EN bit set for Auto BKOPS support

Adding dedicated flag for AUTO_BKOPS in card->ext_csd structure.
Read AUTO_BKOPS bit value from the device EXT_CSD and set to the
card->ext_csd structure.
In mmc_decode_ext_csd() add a print message in case the AUTO_BKOPS
is enabled
Signed-off-by: default avatarUri Yanai <uri.yanai@sandisk.com>
Signed-off-by: default avatarAlex Lemberg <alex.lemberg@sandisk.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 6962c2fb
...@@ -546,6 +546,12 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) ...@@ -546,6 +546,12 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
if (card->ext_csd.man_bkops_en) if (card->ext_csd.man_bkops_en)
pr_debug("%s: MAN_BKOPS_EN bit is set\n", pr_debug("%s: MAN_BKOPS_EN bit is set\n",
mmc_hostname(card->host)); mmc_hostname(card->host));
card->ext_csd.auto_bkops_en =
(ext_csd[EXT_CSD_BKOPS_EN] &
EXT_CSD_AUTO_BKOPS_MASK);
if (card->ext_csd.auto_bkops_en)
pr_debug("%s: AUTO_BKOPS_EN bit is set\n",
mmc_hostname(card->host));
} }
/* check whether the eMMC card supports HPI */ /* check whether the eMMC card supports HPI */
......
...@@ -83,6 +83,7 @@ struct mmc_ext_csd { ...@@ -83,6 +83,7 @@ struct mmc_ext_csd {
unsigned int hpi_cmd; /* cmd used as HPI */ unsigned int hpi_cmd; /* cmd used as HPI */
bool bkops; /* background support bit */ bool bkops; /* background support bit */
bool man_bkops_en; /* manual bkops enable bit */ bool man_bkops_en; /* manual bkops enable bit */
bool auto_bkops_en; /* auto bkops enable bit */
unsigned int data_sector_size; /* 512 bytes or 4KB */ unsigned int data_sector_size; /* 512 bytes or 4KB */
unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ unsigned int data_tag_unit_size; /* DATA TAG UNIT size */
unsigned int boot_ro_lock; /* ro lock support */ unsigned int boot_ro_lock; /* ro lock support */
......
...@@ -407,6 +407,7 @@ static inline bool mmc_op_multi(u32 opcode) ...@@ -407,6 +407,7 @@ static inline bool mmc_op_multi(u32 opcode)
* BKOPS modes * BKOPS modes
*/ */
#define EXT_CSD_MANUAL_BKOPS_MASK 0x01 #define EXT_CSD_MANUAL_BKOPS_MASK 0x01
#define EXT_CSD_AUTO_BKOPS_MASK 0x02
/* /*
* Command Queue * Command Queue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment