UPSTREAM: mmc-utils: Add Command Queue fields to Extended CSD
Display Command Queue information when printing Extended CSD
Example:
# mmc extcsd read /dev/mmcblk0 | grep CMDQ
Command Queue Support [CMDQ_SUPPORT]: 0x01
Command Queue Depth [CMDQ_DEPTH]: 16
Command Enabled [CMDQ_MODE_EN]: 0x01
BUG=None
TEST=Compile
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
(cherry picked from commit a3d3331e6854a4607133bed152988d51250107ca)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: Ibde7ce50ea7dc0875613cf0d9dfb6fa29feb32d9
Reviewed-on: https://chromium-review.googlesource.com/1114440
Commit-Ready: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
diff --git a/mmc_cmds.c b/mmc_cmds.c
index 55757d9..672d15d 100644
--- a/mmc_cmds.c
+++ b/mmc_cmds.c
@@ -1845,6 +1845,15 @@
printf("eMMC Firmware Version: %s\n",
(char*)&ext_csd[EXT_CSD_FIRMWARE_VERSION]);
}
+
+ if (ext_csd_rev >= 8) {
+ printf("Command Queue Support [CMDQ_SUPPORT]: 0x%02x\n",
+ ext_csd[EXT_CSD_CMDQ_SUPPORT]);
+ printf("Command Queue Depth [CMDQ_DEPTH]: %u\n",
+ (ext_csd[EXT_CSD_CMDQ_DEPTH] & 0x1f) + 1);
+ printf("Command Enabled [CMDQ_MODE_EN]: 0x%02x\n",
+ ext_csd[EXT_CSD_CMDQ_MODE_EN]);
+ }
out_free:
return ret;
}