There is small problem to support the MMC card >4 GByte.
PATCH 1/1 There is small problem to support the MMC card >4 GByte.
EXT_CSD_REV could be any value <=3D2 and are valid as per MMCA Specificatio= n. And it was checking for CSD_STRUCTURE filed of EXT_CSD register.
Signed-off-by Sukumar Ghorai <[email protected]>
--- drivers/mmc/core/mmc.c | 2 +- include/linux/mmc/mmc.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
drivers/mmc/core/mmc.c +1 -1
@@ -216,7 +216,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) goto out; } - if (ext_csd_struct >=3D 2) { + if (ext_csd[EXT_CSD_STRUCT_REV] >=3D 2) { card->ext_csd.sectors =3D ext_csd[EXT_CSD_SEC_CNT +0 ] <<0 | ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |
include/linux/mmc/mmc.h +1 -0
@@ -252,6 +252,7 @@ struct _mmc_csd {#define EXT_CSD_BUS_WIDTH 183/* R/W */ #define EXT_CSD_HS_TIMING 185/* R/W */ #define EXT_CSD_CARD_TYPE 196/* RO */ +#define EXT_CSD_STRUCT_REV 194/* RO */ #define EXT_CSD_REV 192/* RO */ #define EXT_CSD_SEC_CNT 212/* RO, 4 bytes */
--
1.5.4.7
Thanks Regards,
Ghorai