@@ -683,7 +683,7 @@ static unsigned int calculate_freq_for_card(struct mmc_davinci_host *host,
static void calculate_clk_divider(struct mmc_host *mmc, struct mmc_ios *ios)
{
- unsigned int open_drain_freq = 0, mmc_pclk = 0;
+ unsigned int open_drain_freq = 0;
unsigned int mmc_push_pull_freq = 0;
struct mmc_davinci_host *host = mmc_priv(mmc);
@@ -693,7 +693,7 @@ static void calculate_clk_divider(struct mmc_host *mmc, struct mmc_ios *ios)
/* Ignoring the init clock value passed for fixing the inter
* operability with different cards.
*/
- open_drain_freq = ((unsigned int)mmc_pclk
+ open_drain_freq = ((unsigned int)host->mmc_input_clk
/ (2 * MMCSD_INIT_CLOCK)) - 1;
if (open_drain_freq > 0xFF)
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> --- drivers/mmc/host/davinci_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)