]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: Changed the datatype of the variable to handle 64-bit arch
authorVipul Kumar <vipul.kumar@xilinx.com>
Thu, 3 May 2018 06:50:54 +0000 (12:20 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 30 May 2018 06:24:08 +0000 (08:24 +0200)
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 <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/mmc.c
drivers/mmc/sdhci.c

index 73885f65dcc194104feaceacc261d4c3a8a415a3..9215d264403d8eecb9c4b623059f2d36a8124f83 100644 (file)
@@ -504,7 +504,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;
@@ -2039,7 +2039,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);
 
index 064ccf85c446a84d7cd3a10c9f8ed6ab5b45b6b9..8a1edf5c6454d3d9fe73fece6cbcf7f6203e9140 100644 (file)
@@ -153,7 +153,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;