/* Send CMD8 to get EXT_CSD value of MMC;.  */
static int mmc_read_esd(uint32_t instance)
/* Send CMD8 to get EXT_CSD value of MMC;.  */
static int mmc_read_esd(uint32_t instance)
{
    command_t cmd;
    card_cmd_config(&cmd, CMD16, BLK_LEN, READ, RESPONSE_48, DATA_PRESENT_NONE, TRUE, TRUE);
    usdhc_printf("Send CMD16.\n");
    if (SUCCESS == host_send_cmd(instance, &cmd)) {
        host_cfg_block(instance, BLK_LEN, ONE, ESDHC_BLKATTR_WML_BLOCK);
        card_cmd_config(&cmd, CMD8, NO_ARG, READ, RESPONSE_48, DATA_PRESENT, TRUE, TRUE);
        usdhc_printf("Send CMD8.\n");
        if (SUCCESS == host_send_cmd(instance, &cmd)) {
            return host_data_read(instance, (int *)ext_csd_data, BLK_LEN,
                                  ESDHC_BLKATTR_WML_BLOCK);
        }
    }
    return FAIL;
}