@@ -423,10 +423,6 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
423
423
424
424
/* EXT_CSD value is in units of 10ms, but we store in ms */
425
425
card -> ext_csd .part_time = 10 * ext_csd [EXT_CSD_PART_SWITCH_TIME ];
426
- /* Some eMMC set the value too low so set a minimum */
427
- if (card -> ext_csd .part_time &&
428
- card -> ext_csd .part_time < MMC_MIN_PART_SWITCH_TIME )
429
- card -> ext_csd .part_time = MMC_MIN_PART_SWITCH_TIME ;
430
426
431
427
/* Sleep / awake timeout in 100ns units */
432
428
if (sa_shift > 0 && sa_shift <= 0x17 )
@@ -616,6 +612,17 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
616
612
card -> ext_csd .data_sector_size = 512 ;
617
613
}
618
614
615
+ /*
616
+ * GENERIC_CMD6_TIME is to be used "unless a specific timeout is defined
617
+ * when accessing a specific field", so use it here if there is no
618
+ * PARTITION_SWITCH_TIME.
619
+ */
620
+ if (!card -> ext_csd .part_time )
621
+ card -> ext_csd .part_time = card -> ext_csd .generic_cmd6_time ;
622
+ /* Some eMMC set the value too low so set a minimum */
623
+ if (card -> ext_csd .part_time < MMC_MIN_PART_SWITCH_TIME )
624
+ card -> ext_csd .part_time = MMC_MIN_PART_SWITCH_TIME ;
625
+
619
626
/* eMMC v5 or later */
620
627
if (card -> ext_csd .rev >= 7 ) {
621
628
memcpy (card -> ext_csd .fwrev , & ext_csd [EXT_CSD_FIRMWARE_VERSION ],
0 commit comments