From: Vipul Kumar Date: Thu, 3 May 2018 06:50:54 +0000 (+0530) Subject: mmc: Changed the datatype of the variable to handle 64-bit arch X-Git-Tag: v2018.07-rc1~159^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=36332b6e4b122e0bdb43eb992533bdd911b6c030;p=u-boot mmc: Changed the datatype of the variable to handle 64-bit arch This patch changed the datatype of variable "start" from uint to ulong to work properly on 64-bit machines as well. Also the return type of get_timer() function is ulong. Signed-off-by: Vipul Kumar Signed-off-by: Michal Simek --- diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index a08c69476c..3cfe6bff49 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -679,7 +679,7 @@ static int mmc_complete_op_cond(struct mmc *mmc) { struct mmc_cmd cmd; int timeout = 1000; - uint start; + ulong start; int err; mmc->op_cond_pending = 0; @@ -2611,7 +2611,7 @@ static int mmc_complete_init(struct mmc *mmc) int mmc_init(struct mmc *mmc) { int err = 0; - __maybe_unused unsigned start; + __maybe_unused ulong start; #if CONFIG_IS_ENABLED(DM_MMC) struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc->dev); diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 758850fc3b..c2ae3e327b 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -151,7 +151,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, u32 mask, flags, mode; unsigned int time = 0, start_addr = 0; int mmc_dev = mmc_get_blk_desc(mmc)->devnum; - unsigned start = get_timer(0); + ulong start = get_timer(0); /* Timeout unit - ms */ static unsigned int cmd_timeout = SDHCI_CMD_DEFAULT_TIMEOUT;