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;
* 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;