Lines Matching +full:mmc +full:- +full:card
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * linux/drivers/mmc/sdio_ops.c
5 * Copyright 2006-2007 Pierre Ossman
10 #include <linux/mmc/host.h>
11 #include <linux/mmc/card.h>
12 #include <linux/mmc/mmc.h>
13 #include <linux/mmc/sdio.h>
27 for (i = 100; i; i--) { in mmc_send_io_op_cond()
40 * an initialized card under SPI, but some cards in mmc_send_io_op_cond()
51 err = -ETIMEDOUT; in mmc_send_io_op_cond()
69 return -EINVAL; in mmc_io_rw_direct_host()
73 return -EINVAL; in mmc_io_rw_direct_host()
91 return -EIO; in mmc_io_rw_direct_host()
93 return -EINVAL; in mmc_io_rw_direct_host()
95 return -ERANGE; in mmc_io_rw_direct_host()
108 int mmc_io_rw_direct(struct mmc_card *card, int write, unsigned fn, in mmc_io_rw_direct() argument
111 return mmc_io_rw_direct_host(card->host, write, fn, addr, in, out); in mmc_io_rw_direct()
114 int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn, in mmc_io_rw_extended() argument
123 unsigned int seg_size = card->host->max_seg_size; in mmc_io_rw_extended()
130 return -EINVAL; in mmc_io_rw_extended()
155 return -ENOMEM; in mmc_io_rw_extended()
163 left_size -= seg_size; in mmc_io_rw_extended()
172 mmc_set_data_timeout(&data, card); in mmc_io_rw_extended()
174 mmc_pre_req(card->host, &mrq); in mmc_io_rw_extended()
176 mmc_wait_for_req(card->host, &mrq); in mmc_io_rw_extended()
182 else if (mmc_host_is_spi(card->host)) in mmc_io_rw_extended()
186 err = -EIO; in mmc_io_rw_extended()
188 err = -EINVAL; in mmc_io_rw_extended()
190 err = -ERANGE; in mmc_io_rw_extended()
194 mmc_post_req(card->host, &mrq, err); in mmc_io_rw_extended()