]> git.sur5r.net Git - u-boot/commitdiff
mmc: remove the hard setting for tran_speed
authorJaehoon Chung <jh80.chung@samsung.com>
Mon, 26 Mar 2012 21:16:03 +0000 (21:16 +0000)
committerAndy Fleming <afleming@freescale.com>
Fri, 13 Jul 2012 22:04:49 +0000 (17:04 -0500)
mmc_set_clock is set to the hard-coding.
But i think good that use the tran_speed value.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
drivers/mmc/mmc.c

index aebe578ff6f2e0228baa3e5d010f6808ea269760..9f746a304051297caf59aeb929bab89384a05689 100644 (file)
@@ -1195,9 +1195,9 @@ int mmc_startup(struct mmc *mmc)
                }
 
                if (mmc->card_caps & MMC_MODE_HS)
-                       mmc_set_clock(mmc, 50000000);
+                       mmc->tran_speed = 50000000;
                else
-                       mmc_set_clock(mmc, 25000000);
+                       mmc->tran_speed = 25000000;
        } else {
                width = ((mmc->host_caps & MMC_MODE_MASK_WIDTH_BITS) >>
                         MMC_MODE_WIDTH_BITS_SHIFT);
@@ -1234,13 +1234,14 @@ int mmc_startup(struct mmc *mmc)
 
                if (mmc->card_caps & MMC_MODE_HS) {
                        if (mmc->card_caps & MMC_MODE_HS_52MHz)
-                               mmc_set_clock(mmc, 52000000);
+                               mmc->tran_speed = 52000000;
                        else
-                               mmc_set_clock(mmc, 26000000);
-               } else
-                       mmc_set_clock(mmc, 20000000);
+                               mmc->tran_speed = 26000000;
+               }
        }
 
+       mmc_set_clock(mmc, mmc->tran_speed);
+
        /* fill in device description */
        mmc->block_dev.lun = 0;
        mmc->block_dev.type = 0;