refactor(nxp-mmc): populate command transfer type
The CMD_XFR_TYP register description in the reference manual includes a
table where the response type, index check, and CRC check are populated
based on the CMD's response type. Therefore, replace the CMD_XFR_TYP set
based on the command ID with the mechanism mentioned in the reference
manual.
Change-Id: Ibe6e04d1682e258ae2377dd7a1d0abb6c7b3f164
Co-developed-by: Ciprian Costea <ciprianmarian.costea@nxp.com>
Signed-off-by: Ciprian Costea <ciprianmarian.costea@nxp.com>
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
diff --git a/drivers/imx/usdhc/imx_usdhc.h b/drivers/imx/usdhc/imx_usdhc.h
index 6ac4b0e..8d64dfc 100644
--- a/drivers/imx/usdhc/imx_usdhc.h
+++ b/drivers/imx/usdhc/imx_usdhc.h
@@ -31,6 +31,7 @@
#define XFERTYPE 0x00cU
#define XFERTYPE_CMD(x) (((x) & 0x3fU) << 24U)
+#define XFERTYPE_GET_CMD(x) (((x) & GENMASK_32(29U, 24U)) >> 24U)
#define XFERTYPE_CMDTYP_ABORT (3U << 22U)
#define XFERTYPE_DPSEL BIT_32(21U)
#define XFERTYPE_CICEN BIT_32(20U)