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()
608 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
609 if (stat) in mxcmci_push()
610 return stat; in mxcmci_push()
619 int stat, i; in mxcmci_transfer_data() local
626 stat = mxcmci_pull(host, sg_virt(sg), sg->length); in mxcmci_transfer_data()
627 if (stat) in mxcmci_transfer_data()
628 return stat; in mxcmci_transfer_data()
633 stat = mxcmci_push(host, sg_virt(sg), sg->length); in mxcmci_transfer_data()
634 if (stat) in mxcmci_transfer_data()
635 return stat; in mxcmci_transfer_data()
638 stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE); in mxcmci_transfer_data()
639 if (stat) in mxcmci_transfer_data()
640 return stat; in mxcmci_transfer_data()
665 static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat) in mxcmci_data_done() argument
687 data_error = mxcmci_finish_data(host, stat); in mxcmci_data_done()
691 mxcmci_read_response(host, stat); in mxcmci_data_done()
704 static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) in mxcmci_cmd_done() argument
706 mxcmci_read_response(host, stat); in mxcmci_cmd_done()
728 u32 stat; in mxcmci_irq() local
730 stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_irq()
732 stat & ~(STATUS_SDIO_INT_ACTIVE | STATUS_DATA_TRANS_DONE | in mxcmci_irq()
736 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); in mxcmci_irq()
739 sdio_irq = (stat & STATUS_SDIO_INT_ACTIVE) && host->use_sdio; in mxcmci_irq()
742 if (mxcmci_use_dma(host) && (stat & (STATUS_WRITE_OP_DONE))) in mxcmci_irq()
750 if (stat & STATUS_END_CMD_RESP) in mxcmci_irq()
751 mxcmci_cmd_done(host, stat); in mxcmci_irq()
753 if (mxcmci_use_dma(host) && (stat & STATUS_WRITE_OP_DONE)) { in mxcmci_irq()
755 mxcmci_data_done(host, stat); in mxcmci_irq()
759 (stat & (STATUS_CARD_INSERTION | STATUS_CARD_REMOVAL))) in mxcmci_irq()
975 unsigned int stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_watchdog() local
981 __func__, stat); in mxcmci_watchdog()
985 __func__, stat); in mxcmci_watchdog()