2 * linux/drivers/mmc/sdio_ops.c
4 * Copyright 2006-2007 Pierre Ossman
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
12 #include <linux/mmc/host.h>
13 #include <linux/mmc/mmc.h>
14 #include <linux/mmc/sdio.h>
18 int mmc_send_io_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
20 struct mmc_command cmd;
25 memset(&cmd, 0, sizeof(struct mmc_command));
27 cmd.opcode = SD_IO_SEND_OP_COND;
29 cmd.flags = MMC_RSP_R4 | MMC_CMD_BCR;
31 for (i = 100; i; i--) {
32 err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
36 if (cmd.resp[0] & MMC_CARD_BUSY || ocr == 0)