- struct mmc *mmc;
- int err = 0;
-
- mmc = calloc(sizeof(struct mmc), 1);
- if (!mmc) {
- printf("mmc calloc fail!\n");
- return -1;
- }
-
- mmc->priv = host;
- host->mmc = mmc;
-
- sprintf(mmc->name, "%s", host->name);
- mmc->send_cmd = dwmci_send_cmd;
- mmc->set_ios = dwmci_set_ios;
- mmc->init = dwmci_init;
- mmc->f_min = min_clk;
- mmc->f_max = max_clk;
+ host->cfg.name = host->name;
+ host->cfg.ops = &dwmci_ops;
+ host->cfg.f_min = min_clk;
+ host->cfg.f_max = max_clk;