Lines Matching refs:stat

202 static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)  in mxcmci_finish_data()  argument
206 if (stat & STATUS_ERR_MASK) { in mxcmci_finish_data()
208 stat); in mxcmci_finish_data()
209 if (stat & STATUS_CRC_READ_ERR) { in mxcmci_finish_data()
211 } else if (stat & STATUS_CRC_WRITE_ERR) { in mxcmci_finish_data()
212 u32 err_code = (stat >> 9) & 0x3; in mxcmci_finish_data()
217 } else if (stat & STATUS_TIME_OUT_READ) { in mxcmci_finish_data()
229 static int mxcmci_read_response(struct mxcmci_host *host, unsigned int stat) in mxcmci_read_response() argument
239 if (stat & STATUS_TIME_OUT_RESP) { in mxcmci_read_response()
242 } else if (stat & STATUS_RESP_CRC_ERR && cmd->resp_type & MMC_RSP_CRC) { in mxcmci_read_response()
266 u32 stat; in mxcmci_poll_status() local
270 stat = readl(&host->base->status); in mxcmci_poll_status()
271 if (stat & STATUS_ERR_MASK) in mxcmci_poll_status()
272 return stat; in mxcmci_poll_status()
275 if (stat & mask) in mxcmci_poll_status()
282 unsigned int stat; in mxcmci_pull() local
286 stat = mxcmci_poll_status(host, in mxcmci_pull()
288 if (stat) in mxcmci_pull()
289 return stat; in mxcmci_pull()
298 stat = mxcmci_poll_status(host, in mxcmci_pull()
300 if (stat) in mxcmci_pull()
301 return stat; in mxcmci_pull()
311 unsigned int stat; in mxcmci_push() local
315 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
316 if (stat) in mxcmci_push()
317 return stat; in mxcmci_push()
326 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
327 if (stat) in mxcmci_push()
328 return stat; in mxcmci_push()
334 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
335 if (stat) in mxcmci_push()
336 return stat; in mxcmci_push()
344 int stat; in mxcmci_transfer_data() local
351 stat = mxcmci_pull(host, data->dest, length); in mxcmci_transfer_data()
352 if (stat) in mxcmci_transfer_data()
353 return stat; in mxcmci_transfer_data()
356 stat = mxcmci_push(host, (const void *)(data->src), length); in mxcmci_transfer_data()
357 if (stat) in mxcmci_transfer_data()
358 return stat; in mxcmci_transfer_data()
360 stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE); in mxcmci_transfer_data()
361 if (stat) in mxcmci_transfer_data()
362 return stat; in mxcmci_transfer_data()
367 static int mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) in mxcmci_cmd_done() argument
372 ret = mxcmci_read_response(host, stat); in mxcmci_cmd_done()
395 u32 stat; in mxcmci_request() local
414 stat = readl(&host->base->status); in mxcmci_request()
415 writel(stat, &host->base->status); in mxcmci_request()
416 } while (!(stat & STATUS_END_CMD_RESP)); in mxcmci_request()
418 return mxcmci_cmd_done(host, stat); in mxcmci_request()