Lines Matching refs:mmc

51 static int pxa_mmc_wait(struct mmc *mmc, uint32_t mask)  in pxa_mmc_wait()  argument
53 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_wait()
70 static int pxa_mmc_stop_clock(struct mmc *mmc) in pxa_mmc_stop_clock() argument
72 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_stop_clock()
98 static int pxa_mmc_start_cmd(struct mmc *mmc, struct mmc_cmd *cmd, in pxa_mmc_start_cmd() argument
101 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_start_cmd()
134 ret = pxa_mmc_wait(mmc, MMC_STAT_CLK_EN); in pxa_mmc_start_cmd()
142 static int pxa_mmc_cmd_done(struct mmc *mmc, struct mmc_cmd *cmd) in pxa_mmc_cmd_done() argument
144 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_cmd_done()
184 static int pxa_mmc_do_read_xfer(struct mmc *mmc, struct mmc_data *data) in pxa_mmc_do_read_xfer() argument
186 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_do_read_xfer()
213 ret = pxa_mmc_wait(mmc, MMC_STAT_DATA_TRAN_DONE); in pxa_mmc_do_read_xfer()
220 static int pxa_mmc_do_write_xfer(struct mmc *mmc, struct mmc_data *data) in pxa_mmc_do_write_xfer() argument
222 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_do_write_xfer()
250 ret = pxa_mmc_wait(mmc, MMC_STAT_DATA_TRAN_DONE); in pxa_mmc_do_write_xfer()
255 ret = pxa_mmc_wait(mmc, MMC_STAT_PRG_DONE); in pxa_mmc_do_write_xfer()
262 static int pxa_mmc_request(struct mmc *mmc, struct mmc_cmd *cmd, in pxa_mmc_request() argument
265 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_request()
271 ret = pxa_mmc_stop_clock(mmc); in pxa_mmc_request()
287 if (mmc->bus_width == 4) in pxa_mmc_request()
291 ret = pxa_mmc_start_cmd(mmc, cmd, cmdat); in pxa_mmc_request()
296 ret = pxa_mmc_wait(mmc, MMC_STAT_END_CMD_RES); in pxa_mmc_request()
301 ret = pxa_mmc_cmd_done(mmc, cmd); in pxa_mmc_request()
308 pxa_mmc_do_write_xfer(mmc, data); in pxa_mmc_request()
310 pxa_mmc_do_read_xfer(mmc, data); in pxa_mmc_request()
316 static int pxa_mmc_set_ios(struct mmc *mmc) in pxa_mmc_set_ios() argument
318 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_set_ios()
323 if (!mmc->clock) { in pxa_mmc_set_ios()
324 pxa_mmc_stop_clock(mmc); in pxa_mmc_set_ios()
329 if (mmc->clock == 26000000) { in pxa_mmc_set_ios()
336 tmp = mmc->cfg->f_max / mmc->clock; in pxa_mmc_set_ios()
349 static int pxa_mmc_init(struct mmc *mmc) in pxa_mmc_init() argument
351 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_init()
355 pxa_mmc_stop_clock(mmc); in pxa_mmc_init()
387 struct mmc *mmc; in pxa_mmc_register() local
422 mmc = mmc_create(&pxa_mmc_cfg, priv); in pxa_mmc_register()
423 if (mmc == NULL) in pxa_mmc_register()