Lines Matching refs:mmc

24 	struct mmc mmc;  member
208 static int mmc_config_clock(struct sunxi_mmc_priv *priv, struct mmc *mmc) in mmc_config_clock() argument
219 if (mmc_set_mod_clk(priv, mmc->clock)) in mmc_config_clock()
236 struct mmc *mmc) in sunxi_mmc_set_ios_common() argument
239 mmc->bus_width, mmc->clock); in sunxi_mmc_set_ios_common()
242 if (mmc->clock && mmc_config_clock(priv, mmc) != 0) { in sunxi_mmc_set_ios_common()
248 if (mmc->bus_width == 8) in sunxi_mmc_set_ios_common()
250 else if (mmc->bus_width == 4) in sunxi_mmc_set_ios_common()
259 static int sunxi_mmc_core_init(struct mmc *mmc) in sunxi_mmc_core_init() argument
261 struct sunxi_mmc_priv *priv = mmc->priv; in sunxi_mmc_core_init()
271 static int mmc_trans_data_by_cpu(struct sunxi_mmc_priv *priv, struct mmc *mmc, in mmc_trans_data_by_cpu() argument
306 static int mmc_rint_wait(struct sunxi_mmc_priv *priv, struct mmc *mmc, in mmc_rint_wait() argument
326 struct mmc *mmc, struct mmc_cmd *cmd, in sunxi_mmc_send_cmd_common() argument
384 ret = mmc_trans_data_by_cpu(priv, mmc, data); in sunxi_mmc_send_cmd_common()
393 error = mmc_rint_wait(priv, mmc, 1000, SUNXI_MMC_RINT_COMMAND_DONE, in sunxi_mmc_send_cmd_common()
401 error = mmc_rint_wait(priv, mmc, timeout_msecs, in sunxi_mmc_send_cmd_common()
449 static int sunxi_mmc_set_ios_legacy(struct mmc *mmc) in sunxi_mmc_set_ios_legacy() argument
451 struct sunxi_mmc_priv *priv = mmc->priv; in sunxi_mmc_set_ios_legacy()
453 return sunxi_mmc_set_ios_common(priv, mmc); in sunxi_mmc_set_ios_legacy()
456 static int sunxi_mmc_send_cmd_legacy(struct mmc *mmc, struct mmc_cmd *cmd, in sunxi_mmc_send_cmd_legacy() argument
459 struct sunxi_mmc_priv *priv = mmc->priv; in sunxi_mmc_send_cmd_legacy()
461 return sunxi_mmc_send_cmd_common(priv, mmc, cmd, data); in sunxi_mmc_send_cmd_legacy()
464 static int sunxi_mmc_getcd_legacy(struct mmc *mmc) in sunxi_mmc_getcd_legacy() argument
466 struct sunxi_mmc_priv *priv = mmc->priv; in sunxi_mmc_getcd_legacy()
483 struct mmc *sunxi_mmc_init(int sdc_no) in sunxi_mmc_init()
536 return sunxi_mmc_set_ios_common(priv, &plat->mmc); in sunxi_mmc_set_ios()
545 return sunxi_mmc_send_cmd_common(priv, &plat->mmc, cmd, data); in sunxi_mmc_send_cmd()
623 upriv->mmc = &plat->mmc; in sunxi_mmc_probe()
636 return mmc_bind(dev, &plat->mmc, &plat->cfg); in sunxi_mmc_bind()