diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2019-07-02 10:53:55 +0200 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2019-07-15 10:16:49 +0800 |
commit | 513e00b64e63c277ad6dd667b823282ef4d177c1 (patch) | |
tree | b07c72fa7cfb0d2d2adc19dbb68e9c13751daa77 /include/mmc.h | |
parent | 39320c537def08bafa07ef3dd0f519465e56d57d (diff) |
mmc: When switching partition, use the timeout specified in the ext_csd
The e-MMC spec allows the e-MMC to specify a timeout for the partition
switch command. It can take up to 2550 ms. There is no lower limit to this
value in the spec, but do as the the linux driver does and force it to be
at least 300ms.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r-- | include/mmc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h index 711cb5d116..032873c2ff 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -226,6 +226,7 @@ static inline bool mmc_is_tuning_cmd(uint cmdidx) #define EXT_CSD_HS_TIMING 185 /* R/W */ #define EXT_CSD_REV 192 /* RO */ #define EXT_CSD_CARD_TYPE 196 /* RO */ +#define EXT_CSD_PART_SWITCH_TIME 199 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ #define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ #define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */ @@ -587,6 +588,7 @@ struct mmc { u8 wr_rel_set; u8 part_config; u8 gen_cmd6_time; + u8 part_switch_time; uint tran_speed; uint legacy_speed; /* speed for the legacy mode provided by the card */ uint read_bl_len; @@ -833,6 +835,9 @@ extern uint mmc_get_env_part(struct mmc *mmc); # endif int mmc_get_env_dev(void); +/* Minimum partition switch timeout in units of 10-milliseconds */ +#define MMC_MIN_PART_SWITCH_TIME 30 /* 300 ms */ + /* Set block count limit because of 16 bit register limit on some hardware*/ #ifndef CONFIG_SYS_MMC_MAX_BLK_COUNT #define CONFIG_SYS_MMC_MAX_BLK_COUNT 65535 |