Lines Matching refs:stat
365 static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat);
366 static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat);
371 u32 stat; in mxcmci_dma_callback() local
375 stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_dma_callback()
377 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); in mxcmci_dma_callback()
379 mxcmci_data_done(host, stat); in mxcmci_dma_callback()
454 static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat) in mxcmci_finish_data() argument
465 if (stat & STATUS_ERR_MASK) { in mxcmci_finish_data()
467 stat); in mxcmci_finish_data()
468 if (stat & STATUS_CRC_READ_ERR) { in mxcmci_finish_data()
471 } else if (stat & STATUS_CRC_WRITE_ERR) { in mxcmci_finish_data()
472 u32 err_code = (stat >> 9) & 0x3; in mxcmci_finish_data()
482 } else if (stat & STATUS_TIME_OUT_READ) { in mxcmci_finish_data()
501 static void mxcmci_read_response(struct mxcmci_host *host, unsigned int stat) in mxcmci_read_response() argument
510 if (stat & STATUS_TIME_OUT_RESP) { in mxcmci_read_response()
513 } else if (stat & STATUS_RESP_CRC_ERR && cmd->flags & MMC_RSP_CRC) { in mxcmci_read_response()
536 u32 stat; in mxcmci_poll_status() local
540 stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_poll_status()
541 if (stat & STATUS_ERR_MASK) in mxcmci_poll_status()
542 return stat; in mxcmci_poll_status()
548 if (stat & mask) in mxcmci_poll_status()
556 unsigned int stat; in mxcmci_pull() local
560 stat = mxcmci_poll_status(host, in mxcmci_pull()
562 if (stat) in mxcmci_pull()
563 return stat; in mxcmci_pull()
572 stat = mxcmci_poll_status(host, in mxcmci_pull()
574 if (stat) in mxcmci_pull()
575 return stat; in mxcmci_pull()
585 unsigned int stat; in mxcmci_push() local
589 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
590 if (stat) in mxcmci_push()
591 return stat; in mxcmci_push()
600 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
601 if (stat) in mxcmci_push()
602 return stat; in mxcmci_push()
615 int stat, i; in mxcmci_transfer_data() local
622 stat = mxcmci_pull(host, sg_virt(sg), sg->length); in mxcmci_transfer_data()
623 if (stat) in mxcmci_transfer_data()
624 return stat; in mxcmci_transfer_data()
629 stat = mxcmci_push(host, sg_virt(sg), sg->length); in mxcmci_transfer_data()
630 if (stat) in mxcmci_transfer_data()
631 return stat; in mxcmci_transfer_data()
634 stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE); in mxcmci_transfer_data()
635 if (stat) in mxcmci_transfer_data()
636 return stat; in mxcmci_transfer_data()
661 static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat) in mxcmci_data_done() argument
683 data_error = mxcmci_finish_data(host, stat); in mxcmci_data_done()
687 mxcmci_read_response(host, stat); in mxcmci_data_done()
700 static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) in mxcmci_cmd_done() argument
702 mxcmci_read_response(host, stat); in mxcmci_cmd_done()
724 u32 stat; in mxcmci_irq() local
726 stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_irq()
728 stat & ~(STATUS_SDIO_INT_ACTIVE | STATUS_DATA_TRANS_DONE | in mxcmci_irq()
732 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); in mxcmci_irq()
735 sdio_irq = (stat & STATUS_SDIO_INT_ACTIVE) && host->use_sdio; in mxcmci_irq()
738 if (mxcmci_use_dma(host) && (stat & (STATUS_WRITE_OP_DONE))) in mxcmci_irq()
746 if (stat & STATUS_END_CMD_RESP) in mxcmci_irq()
747 mxcmci_cmd_done(host, stat); in mxcmci_irq()
749 if (mxcmci_use_dma(host) && (stat & STATUS_WRITE_OP_DONE)) { in mxcmci_irq()
751 mxcmci_data_done(host, stat); in mxcmci_irq()
755 (stat & (STATUS_CARD_INSERTION | STATUS_CARD_REMOVAL))) in mxcmci_irq()
971 unsigned int stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_watchdog() local
977 __func__, stat); in mxcmci_watchdog()
981 __func__, stat); in mxcmci_watchdog()