检测的函数是`mmc_send_app_op_cond`,这个函数是向发送一些命令的,特定的命令只有特定的设备会回。那么是怎么发送呢?在`mmc_send_app_op_cond`里面会调用`mmc_wait_for_app_cmd`,最终又会调用`host->ops->request(host, mrq);`,ops是结构体`mmc_host_ops`,这个是在nxp已经实现好的操作集: staticconsts...
cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R3 | MMC_CMD_BCR; //发送命令并等待命令结束 mmc_wait_for_cmd(host, &cmd, 0) //mmc/core/core.c //第2个参数名:cmd struct mmc_request mrq = {NULL}; mrq.cmd = cmd; cmd->data = NULL; mmc_wait_for_req(host, &mrq)=> __mmc_start_req...
cmd.opcode= SD_SEND_IF_COND; cmd.arg= ((ocr & 0xFF8000) != 0) << 8 | test_pattern; cmd.flags= MMC_RSP_SPI_R7 | MMC_RSP_R7 | MMC_CMD_BCR; err= mmc_wait_for_cmd(host, &cmd, 0); if(err) return err; if(mmc_host_is_spi(host)) result_pattern = cmd.resp[1] & 0xF...
cmd。opcode=MMC_SEND_STATUS;ﻫcmd.arg=card->rca〈<16;cmd。flags=MMC_RSP_R1|MMC_CMD_AC;err=mmc_wait_for_cmd(host,&cmd,CMD_RETRIES);ﻫif(err==MMC_ERR_NONE)continue;ﻫmmc_card_set_dead(card);ﻫ}ﻫ}s3c2410—sdis3c2410-sdi:powereddown.s3c2410—sdis3c2410-sdi:initialisationdone....
struct mmc_command cmd; int err; cmd.opcode = MMC_SEND_STATUS; cmd.arg = card->rca << 16; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); if (err == MMC_ERR_NONE) continue; mmc_card_set_dead(card); ...
err= mmc_wait_for_cmd(host, &cmd, 0); if(err) return err; if(mmc_host_is_spi(host)) result_pattern = cmd.resp[1] & 0xFF; else result_pattern = cmd.resp[0] & 0xFF; if(result_pattern != test_pattern) return -EIO;
cmd.arg = card-rca 16; ???cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; ???err = mmc_wait_for_cmd(host, cmd, CMD_RETRIES); ???if (err == MMC_ERR_NONE) ???continue; ???mmc_card_set_dead(card); } } s3c2410-sdi s3c2410-sdi: powered down. s3c2410-sdi s3c2410-sdi: initialisation...
static uint32_t SDMMC_GetCmdResp1(SDIO_TypeDef *SDIOx, uint8_t SD_CMD, uint32_t Timeout)...
Execute adb shell command,in the shell cmd,execute the "su" command.it will wait for long time and shows as below: [ 83.014933] mmc0: cqhci: timeout for tag 0[ 83.019053] mmc0: cqhci: === CQHCI REGISTER DUMP ===[ 83.025498] mmc0: cqhci: Caps: 0x00003...
bool app_cmd; };static int litex_mmc_sdcard_wait_done(void __iomem *reg, struct device *dev) { u8 evt; int ret;ret = readx_poll_timeout(litex_read8, reg, evt, evt & SD_BIT_DONE, SD_SLEEP_US, SD_TIMEOUT_US); if (ret) ...