platform/msm_shared/mmc.c
static unsigned int mmc_boot_all_send_cid(struct mmc_boot_card *card)
{
	struct mmc_boot_command cmd;
	unsigned int mmc_ret = MMC_BOOT_E_SUCCESS;

	/* basic check */
	if (card == NULL) {
		return MMC_BOOT_E_INVAL;
	}

	memset((struct mmc_boot_command *)&cmd, 0,
	       sizeof(struct mmc_boot_command));

	/* CMD2 Format:
	 * [31:0] stuff bits
	 */
	cmd.cmd_index = CMD2_ALL_SEND_CID;
	cmd.argument = 0;
	cmd.cmd_type = MMC_BOOT_CMD_BCAST_W_RESP;
	cmd.resp_type = MMC_BOOT_RESP_R2;

	/* send command */
	mmc_ret = mmc_boot_send_command(&cmd);
	if (mmc_ret != MMC_BOOT_E_SUCCESS) {
		return mmc_ret;
	}

	/* Response contains card's 128 bits CID register */
	mmc_ret = mmc_boot_decode_and_save_cid(card, cmd.resp);
	if (mmc_ret != MMC_BOOT_E_SUCCESS) {
		return mmc_ret;
	}
	return MMC_BOOT_E_SUCCESS;
}
/*
 * Request any card to send its uniquie card identification (CID) number (CMD2).
 */
Request any card to send its uniquie card identification (CID) number (CMD2).
Request any card to send its uniquie card identification ( CID ) number ( CMD2 ) .
static unsigned int mmc_boot_all_send_cid(struct mmc_boot_card *card)
{
	struct mmc_boot_command cmd;
	unsigned int mmc_ret = MMC_BOOT_E_SUCCESS;
	if (card == NULL) {
		return MMC_BOOT_E_INVAL;
	}
	memset((struct mmc_boot_command *)&cmd, 0,
	       sizeof(struct mmc_boot_command));
	cmd.cmd_index = CMD2_ALL_SEND_CID;
	cmd.argument = 0;
	cmd.cmd_type = MMC_BOOT_CMD_BCAST_W_RESP;
	cmd.resp_type = MMC_BOOT_RESP_R2;
	mmc_ret = mmc_boot_send_command(&cmd);
	if (mmc_ret != MMC_BOOT_E_SUCCESS) {
		return mmc_ret;
	}
	mmc_ret = mmc_boot_decode_and_save_cid(card, cmd.resp);
	if (mmc_ret != MMC_BOOT_E_SUCCESS) {
		return mmc_ret;
	}
	return MMC_BOOT_E_SUCCESS;
}
static unsigned int mmc_boot_all_send_cid ( struct mmc_boot_card * card ) { struct mmc_boot_command cmd ; unsigned int mmc_ret = MMC_BOOT_E_SUCCESS ; if ( card == NULL ) { return MMC_BOOT_E_INVAL ; } memset ( ( struct mmc_boot_command * ) & cmd , 0 , sizeof ( struct mmc_boot_command ) ) ; cmd . cmd_index = CMD2_ALL_SEND_CID ; cmd . argument = 0 ; cmd . cmd_type = MMC_BOOT_CMD_BCAST_W_RESP ; cmd . resp_type = MMC_BOOT_RESP_R2 ; mmc_ret = mmc_boot_send_command ( & cmd ) ; if ( mmc_ret != MMC_BOOT_E_SUCCESS ) { return mmc_ret ; } mmc_ret = mmc_boot_decode_and_save_cid ( card , cmd . resp ) ; if ( mmc_ret != MMC_BOOT_E_SUCCESS ) { return mmc_ret ; } return MMC_BOOT_E_SUCCESS ; }
Request any card to send its uniquie card identification (CID) number (CMD2).
Request any card to send its uniquie card identification ( CID ) number ( CMD2 ) .
/* basic check */ /* CMD2 Format:
	 * [31:0] stuff bits
	 */ /* send command */ /* Response contains card's 128 bits CID register */