Lines Matching refs:mmc
53 static uint mmc_spi_sendcmd(struct mmc *mmc, ushort cmdidx, u32 cmdarg) in mmc_spi_sendcmd() argument
55 struct spi_slave *spi = mmc->priv; in mmc_spi_sendcmd()
76 static uint mmc_spi_readdata(struct mmc *mmc, void *xbuf, in mmc_spi_readdata() argument
79 struct spi_slave *spi = mmc->priv; in mmc_spi_readdata()
96 debug("%s: CRC error\n", mmc->cfg->name); in mmc_spi_readdata()
111 static uint mmc_spi_writedata(struct mmc *mmc, const void *xbuf, in mmc_spi_writedata() argument
114 struct spi_slave *spi = mmc->priv; in mmc_spi_writedata()
173 static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd *cmd, in mmc_spi_request() argument
176 struct spi_slave *spi = mmc->priv; in mmc_spi_request()
184 r1 = mmc_spi_sendcmd(mmc, cmd->cmdidx, cmd->cmdarg); in mmc_spi_request()
195 r1 = mmc_spi_readdata(mmc, cmd->response, 1, 16); in mmc_spi_request()
222 r1 = mmc_spi_readdata(mmc, data->dest, in mmc_spi_request()
225 r1 = mmc_spi_writedata(mmc, data->src, in mmc_spi_request()
239 static int mmc_spi_set_ios(struct mmc *mmc) in mmc_spi_set_ios() argument
241 struct spi_slave *spi = mmc->priv; in mmc_spi_set_ios()
243 debug("%s: clock %u\n", __func__, mmc->clock); in mmc_spi_set_ios()
244 if (mmc->clock) in mmc_spi_set_ios()
245 spi_set_speed(spi, mmc->clock); in mmc_spi_set_ios()
249 static int mmc_spi_init_p(struct mmc *mmc) in mmc_spi_init_p() argument
251 struct spi_slave *spi = mmc->priv; in mmc_spi_init_p()
276 struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode) in mmc_spi_init()
278 struct mmc *mmc; in mmc_spi_init() local
287 mmc = mmc_create(&mmc_spi_cfg, spi); in mmc_spi_init()
288 if (mmc == NULL) { in mmc_spi_init()
292 return mmc; in mmc_spi_init()