mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mmc: mmc: Add Command Queue definitions
Add definitions relating to Command Queuing. Signed-off-by: Adrian Hunter <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
parent
c5bda0ca6f
commit
925ff3a7a3
3 changed files with 37 additions and 0 deletions
|
|
@ -618,6 +618,24 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
|||
(ext_csd[EXT_CSD_SUPPORTED_MODE] & 0x1) &&
|
||||
!(ext_csd[EXT_CSD_FW_CONFIG] & 0x1);
|
||||
}
|
||||
|
||||
/* eMMC v5.1 or later */
|
||||
if (card->ext_csd.rev >= 8) {
|
||||
card->ext_csd.cmdq_support = ext_csd[EXT_CSD_CMDQ_SUPPORT] &
|
||||
EXT_CSD_CMDQ_SUPPORTED;
|
||||
card->ext_csd.cmdq_depth = (ext_csd[EXT_CSD_CMDQ_DEPTH] &
|
||||
EXT_CSD_CMDQ_DEPTH_MASK) + 1;
|
||||
/* Exclude inefficiently small queue depths */
|
||||
if (card->ext_csd.cmdq_depth <= 2) {
|
||||
card->ext_csd.cmdq_support = false;
|
||||
card->ext_csd.cmdq_depth = 0;
|
||||
}
|
||||
if (card->ext_csd.cmdq_support) {
|
||||
pr_debug("%s: Command Queue supported depth %u\n",
|
||||
mmc_hostname(card->host),
|
||||
card->ext_csd.cmdq_depth);
|
||||
}
|
||||
}
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue