summaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2019-08-14 22:52:51 +0300
committerPeng Fan <peng.fan@nxp.com>2019-09-05 10:27:31 +0300
commit6cf8a903c5e6723104b07b0fddc4a703556e558a (patch)
tree8723fbc9d9ffb828edbb71e0588d8f4d34797ede /include/mmc.h
parent116cffeca6fe4de701d4cd5e2b5bfe5e0f1597a9 (diff)
downloadu-boot-6cf8a903c5e6723104b07b0fddc4a703556e558a.tar.xz
mmc: Rename timeout parameters for clarification
It's quite hard to figure out time units for various function that have timeout parameters. This leads to possible errors when one forgets to convert ms to us, for example. Let's rename those parameters correspondingly to 'timeout_us' and 'timeout_ms' to prevent such issues further. While at it, add time units info as comments to struct mmc fields. This commit doesn't change the behavior, only renames parameters names. Buildman should report no changes at all. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 46422f41a4..686ba00656 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -457,10 +457,10 @@ struct dm_mmc_ops {
*
* @dev: Device to check
* @state: target state
- * @timeout: timeout in us
+ * @timeout_us: timeout in us
* @return 0 if dat0 is in the target state, -ve on error
*/
- int (*wait_dat0)(struct udevice *dev, int state, int timeout);
+ int (*wait_dat0)(struct udevice *dev, int state, int timeout_us);
#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
/* set_enhanced_strobe() - set HS400 enhanced strobe */
@@ -476,14 +476,14 @@ int dm_mmc_set_ios(struct udevice *dev);
int dm_mmc_get_cd(struct udevice *dev);
int dm_mmc_get_wp(struct udevice *dev);
int dm_mmc_execute_tuning(struct udevice *dev, uint opcode);
-int dm_mmc_wait_dat0(struct udevice *dev, int state, int timeout);
+int dm_mmc_wait_dat0(struct udevice *dev, int state, int timeout_us);
/* Transition functions for compatibility */
int mmc_set_ios(struct mmc *mmc);
int mmc_getcd(struct mmc *mmc);
int mmc_getwp(struct mmc *mmc);
int mmc_execute_tuning(struct mmc *mmc, uint opcode);
-int mmc_wait_dat0(struct mmc *mmc, int state, int timeout);
+int mmc_wait_dat0(struct mmc *mmc, int state, int timeout_us);
int mmc_set_enhanced_strobe(struct mmc *mmc);
#else
@@ -602,8 +602,8 @@ struct mmc {
u8 part_attr;
u8 wr_rel_set;
u8 part_config;
- u8 gen_cmd6_time;
- u8 part_switch_time;
+ u8 gen_cmd6_time; /* units: 10 ms */
+ u8 part_switch_time; /* units: 10 ms */
uint tran_speed;
uint legacy_speed; /* speed for the legacy mode provided by the card */
uint read_bl_len;