]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/mxsmmc.c
merged denx master branch
[karo-tx-uboot.git] / drivers / mmc / mxsmmc.c
index c7200ee71aeb2e0e622c5993bf5185f52658250a..dd2a791e8bac33d73011eebc26913e2da7b4da74 100644 (file)
@@ -341,11 +341,11 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int))
        struct mxsmmc_priv *priv = NULL;
        int ret;
 
-       mmc = malloc(sizeof(struct mmc));
+       mmc = calloc(sizeof(struct mmc), 1);
        if (!mmc)
                return -ENOMEM;
 
-       priv = malloc(sizeof(struct mxsmmc_priv));
+       priv = calloc(sizeof(struct mxsmmc_priv), 1);
        if (!priv) {
                free(mmc);
                return -ENOMEM;
@@ -405,6 +405,8 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int))
         * CLOCK_DIVIDE has to be an even value from 2 to 254, and
         * CLOCK_RATE could be any integer from 0 to 255.
         */
+       writel(CLKCTRL_SSP_DIV_FRAC_EN | 29, priv->clkctrl_ssp);
+
        mmc->f_min = 400000;
        mmc->f_max = mxc_get_clock(MXC_SSP0_CLK + id) * 1000 / 2;
        mmc->b_max = 0x40;