Lines Matching refs:stat
357 static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat);
358 static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat);
363 u32 stat;
367 stat = mxcmci_readl(host, MMC_REG_STATUS);
369 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat);
371 mxcmci_data_done(host, stat);
446 static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)
457 if (stat & STATUS_ERR_MASK) {
459 stat);
460 if (stat & STATUS_CRC_READ_ERR) {
463 } else if (stat & STATUS_CRC_WRITE_ERR) {
464 u32 err_code = (stat >> 9) & 0x3;
474 } else if (stat & STATUS_TIME_OUT_READ) {
493 static void mxcmci_read_response(struct mxcmci_host *host, unsigned int stat)
502 if (stat & STATUS_TIME_OUT_RESP) {
505 } else if (stat & STATUS_RESP_CRC_ERR && cmd->flags & MMC_RSP_CRC) {
528 u32 stat;
532 stat = mxcmci_readl(host, MMC_REG_STATUS);
533 if (stat & STATUS_ERR_MASK)
534 return stat;
540 if (stat & mask)
548 unsigned int stat;
552 stat = mxcmci_poll_status(host,
554 if (stat)
555 return stat;
564 stat = mxcmci_poll_status(host,
566 if (stat)
567 return stat;
577 unsigned int stat;
581 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
582 if (stat)
583 return stat;
592 stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
593 if (stat)
594 return stat;
607 int stat, i;
614 stat = mxcmci_pull(host, sg_virt(sg), sg->length);
615 if (stat)
616 return stat;
621 stat = mxcmci_push(host, sg_virt(sg), sg->length);
622 if (stat)
623 return stat;
626 stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE);
627 if (stat)
628 return stat;
653 static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat)
675 data_error = mxcmci_finish_data(host, stat);
682 mxcmci_read_response(host, stat);
695 static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat)
697 mxcmci_read_response(host, stat);
718 u32 stat;
720 stat = mxcmci_readl(host, MMC_REG_STATUS);
722 stat & ~(STATUS_SDIO_INT_ACTIVE | STATUS_DATA_TRANS_DONE |
726 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat);
729 sdio_irq = (stat & STATUS_SDIO_INT_ACTIVE) && host->use_sdio;
732 if (mxcmci_use_dma(host) && (stat & (STATUS_WRITE_OP_DONE)))
740 if (stat & STATUS_END_CMD_RESP)
741 mxcmci_cmd_done(host, stat);
743 if (mxcmci_use_dma(host) && (stat & STATUS_WRITE_OP_DONE)) {
745 mxcmci_data_done(host, stat);
749 (stat & (STATUS_CARD_INSERTION | STATUS_CARD_REMOVAL)))
964 unsigned int stat = mxcmci_readl(host, MMC_REG_STATUS);
970 __func__, stat);
974 __func__, stat);