Lines Matching refs:mmc

50 static int pxa_mmc_wait(struct mmc *mmc, uint32_t mask)  in pxa_mmc_wait()  argument
52 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_wait()
69 static int pxa_mmc_stop_clock(struct mmc *mmc) in pxa_mmc_stop_clock() argument
71 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_stop_clock()
97 static int pxa_mmc_start_cmd(struct mmc *mmc, struct mmc_cmd *cmd, in pxa_mmc_start_cmd() argument
100 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_start_cmd()
133 ret = pxa_mmc_wait(mmc, MMC_STAT_CLK_EN); in pxa_mmc_start_cmd()
141 static int pxa_mmc_cmd_done(struct mmc *mmc, struct mmc_cmd *cmd) in pxa_mmc_cmd_done() argument
143 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_cmd_done()
183 static int pxa_mmc_do_read_xfer(struct mmc *mmc, struct mmc_data *data) in pxa_mmc_do_read_xfer() argument
185 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_do_read_xfer()
212 ret = pxa_mmc_wait(mmc, MMC_STAT_DATA_TRAN_DONE); in pxa_mmc_do_read_xfer()
219 static int pxa_mmc_do_write_xfer(struct mmc *mmc, struct mmc_data *data) in pxa_mmc_do_write_xfer() argument
221 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_do_write_xfer()
249 ret = pxa_mmc_wait(mmc, MMC_STAT_DATA_TRAN_DONE); in pxa_mmc_do_write_xfer()
254 ret = pxa_mmc_wait(mmc, MMC_STAT_PRG_DONE); in pxa_mmc_do_write_xfer()
261 static int pxa_mmc_request(struct mmc *mmc, struct mmc_cmd *cmd, in pxa_mmc_request() argument
264 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_request()
270 ret = pxa_mmc_stop_clock(mmc); in pxa_mmc_request()
286 if (mmc->bus_width == 4) in pxa_mmc_request()
290 ret = pxa_mmc_start_cmd(mmc, cmd, cmdat); in pxa_mmc_request()
295 ret = pxa_mmc_wait(mmc, MMC_STAT_END_CMD_RES); in pxa_mmc_request()
300 ret = pxa_mmc_cmd_done(mmc, cmd); in pxa_mmc_request()
307 pxa_mmc_do_write_xfer(mmc, data); in pxa_mmc_request()
309 pxa_mmc_do_read_xfer(mmc, data); in pxa_mmc_request()
315 static int pxa_mmc_set_ios(struct mmc *mmc) in pxa_mmc_set_ios() argument
317 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_set_ios()
322 if (!mmc->clock) { in pxa_mmc_set_ios()
323 pxa_mmc_stop_clock(mmc); in pxa_mmc_set_ios()
328 if (mmc->clock == 26000000) { in pxa_mmc_set_ios()
335 tmp = mmc->cfg->f_max / mmc->clock; in pxa_mmc_set_ios()
348 static int pxa_mmc_init(struct mmc *mmc) in pxa_mmc_init() argument
350 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_init()
354 pxa_mmc_stop_clock(mmc); in pxa_mmc_init()
386 struct mmc *mmc; in pxa_mmc_register() local
421 mmc = mmc_create(&pxa_mmc_cfg, priv); in pxa_mmc_register()
422 if (mmc == NULL) in pxa_mmc_register()