(void) bis;
#ifdef CONFIG_ARM_PL180_MMCI
struct pl180_mmc_host *host;
+ struct mmc *mmc;
host = malloc(sizeof(struct pl180_mmc_host));
if (!host)
host->clock_in = ARM_MCLK;
host->clock_min = ARM_MCLK / (2 * (SDI_CLKCR_CLKDIV_INIT_V1 + 1));
host->clock_max = CONFIG_ARM_PL180_MMCI_CLOCK_FREQ;
- rc = arm_pl180_mmci_init(host);
+ rc = arm_pl180_mmci_init(host, &mmc);
#endif
return rc;
}
* Set initial clock and power for mmc slot.
* Initialize mmc struct and register with mmc framework.
*/
-int arm_pl180_mmci_init(struct pl180_mmc_host *host)
+int arm_pl180_mmci_init(struct pl180_mmc_host *host, struct mmc **mmc)
{
- struct mmc *mmc;
u32 sdi_u32;
writel(host->pwr_init, &host->base->power);
else
host->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
- mmc = mmc_create(&host->cfg, host);
- if (mmc == NULL)
+ *mmc = mmc_create(&host->cfg, host);
+ if (!*mmc)
return -1;
- debug("registered mmc interface number is:%d\n", mmc->block_dev.devnum);
+ debug("registered mmc interface number is:%d\n",
+ (*mmc)->block_dev.devnum);
return 0;
}