Lines Matching refs:stat

340 static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat);
341 static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat);
346 u32 stat; in mxcmci_dma_callback() local
350 stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_dma_callback()
352 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); in mxcmci_dma_callback()
354 mxcmci_data_done(host, stat); in mxcmci_dma_callback()
429 static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat) in mxcmci_finish_data() argument
440 if (stat & STATUS_ERR_MASK) { in mxcmci_finish_data()
442 stat); in mxcmci_finish_data()
443 if (stat & STATUS_CRC_READ_ERR) { in mxcmci_finish_data()
446 } else if (stat & STATUS_CRC_WRITE_ERR) { in mxcmci_finish_data()
447 u32 err_code = (stat >> 9) & 0x3; in mxcmci_finish_data()
457 } else if (stat & STATUS_TIME_OUT_READ) { in mxcmci_finish_data()
476 static void mxcmci_read_response(struct mxcmci_host *host, unsigned int stat) in mxcmci_read_response() argument
485 if (stat & STATUS_TIME_OUT_RESP) { in mxcmci_read_response()
488 } else if (stat & STATUS_RESP_CRC_ERR && cmd->flags & MMC_RSP_CRC) { in mxcmci_read_response()
511 u32 stat; in mxcmci_poll_status() local
515 stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_poll_status()
516 if (stat & STATUS_ERR_MASK) in mxcmci_poll_status()
517 return stat; in mxcmci_poll_status()
523 if (stat & mask) in mxcmci_poll_status()
531 unsigned int stat; in mxcmci_pull() local
535 stat = mxcmci_poll_status(host, in mxcmci_pull()
537 if (stat) in mxcmci_pull()
538 return stat; in mxcmci_pull()
547 stat = mxcmci_poll_status(host, in mxcmci_pull()
549 if (stat) in mxcmci_pull()
550 return stat; in mxcmci_pull()
560 unsigned int stat; in mxcmci_push() local
564 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
565 if (stat) in mxcmci_push()
566 return stat; in mxcmci_push()
575 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); in mxcmci_push()
576 if (stat) in mxcmci_push()
577 return stat; in mxcmci_push()
590 int stat, i; in mxcmci_transfer_data() local
597 stat = mxcmci_pull(host, sg_virt(sg), sg->length); in mxcmci_transfer_data()
598 if (stat) in mxcmci_transfer_data()
599 return stat; in mxcmci_transfer_data()
604 stat = mxcmci_push(host, sg_virt(sg), sg->length); in mxcmci_transfer_data()
605 if (stat) in mxcmci_transfer_data()
606 return stat; in mxcmci_transfer_data()
609 stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE); in mxcmci_transfer_data()
610 if (stat) in mxcmci_transfer_data()
611 return stat; in mxcmci_transfer_data()
636 static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat) in mxcmci_data_done() argument
658 data_error = mxcmci_finish_data(host, stat); in mxcmci_data_done()
665 mxcmci_read_response(host, stat); in mxcmci_data_done()
678 static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) in mxcmci_cmd_done() argument
680 mxcmci_read_response(host, stat); in mxcmci_cmd_done()
701 u32 stat; in mxcmci_irq() local
703 stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_irq()
705 stat & ~(STATUS_SDIO_INT_ACTIVE | STATUS_DATA_TRANS_DONE | in mxcmci_irq()
709 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); in mxcmci_irq()
712 sdio_irq = (stat & STATUS_SDIO_INT_ACTIVE) && host->use_sdio; in mxcmci_irq()
715 if (mxcmci_use_dma(host) && (stat & (STATUS_WRITE_OP_DONE))) in mxcmci_irq()
723 if (stat & STATUS_END_CMD_RESP) in mxcmci_irq()
724 mxcmci_cmd_done(host, stat); in mxcmci_irq()
726 if (mxcmci_use_dma(host) && (stat & STATUS_WRITE_OP_DONE)) { in mxcmci_irq()
728 mxcmci_data_done(host, stat); in mxcmci_irq()
732 (stat & (STATUS_CARD_INSERTION | STATUS_CARD_REMOVAL))) in mxcmci_irq()
947 unsigned int stat = mxcmci_readl(host, MMC_REG_STATUS); in mxcmci_watchdog() local
953 __func__, stat); in mxcmci_watchdog()
957 __func__, stat); in mxcmci_watchdog()