int sdio_read_func_cis(struct sdio_func *func) { int ret; ret = sdio_read_cis(func->card, func); if (ret) return ret; /* * Since we've linked to tuples in the card structure, * we must make sure we have a reference to it. */ get_device(&func->card->dev); /* * Vendor/device id is optional for function CIS, so * copy it from the card structure as needed. */ if (func->vendor == 0) { func->vendor = func->card->cis.vendor; func->device = func->card->cis.device; } return 0; }
static int mmc_sdio_init_card(struct mmc_host *host) { int i = 0, ret = 0; __u32 rocr; ret = mmc_io_rw_direct(host, 1, 0, 6, 8, NULL); for (i = 0; i < 10; i++) { ret = mmc_send_io_op_cond(host, 0, &rocr); if (!(host->resp[0] & (7 << 28))) return -1; ret = mmc_send_io_op_cond(host, rocr, &rocr); if (host->resp[0] & 0x80000000) break; } ret = mmc_set_relative_addr(host); DPRINT("rca = %d\n", host->card.rca); ret = mmc_select_card(host); ret = sdio_read_cccr(host); ret = sdio_read_cis(host); return ret; }
int sdio_read_func_cis(struct sdio_func *func) { int ret; ret = sdio_read_cis(func->card, func); if (ret) return ret; /* */ get_device(&func->card->dev); /* */ if (func->vendor == 0) { func->vendor = func->card->cis.vendor; func->device = func->card->cis.device; } return 0; }
int sdio_read_common_cis(struct mmc_card *card) { return sdio_read_cis(card, NULL); }