mmc: use .multi_io_quirk on tmio_mmc

Now, tmio_mmc can use .multi_io_quirk callback
instead of MMC_CAP2_NO_MULTI_READ flags.
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Kuninori Morimoto 2014-09-08 23:45:25 -07:00 committed by Ulf Hansson
parent afd8c29d25
commit bbf0208d39
2 changed files with 16 additions and 0 deletions

View File

@ -970,12 +970,25 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
return ret; return ret;
} }
static int tmio_multi_io_quirk(struct mmc_card *card,
unsigned int direction, int blk_size)
{
struct tmio_mmc_host *host = mmc_priv(card->host);
struct tmio_mmc_data *pdata = host->pdata;
if (pdata->multi_io_quirk)
return pdata->multi_io_quirk(card, direction, blk_size);
return blk_size;
}
static const struct mmc_host_ops tmio_mmc_ops = { static const struct mmc_host_ops tmio_mmc_ops = {
.request = tmio_mmc_request, .request = tmio_mmc_request,
.set_ios = tmio_mmc_set_ios, .set_ios = tmio_mmc_set_ios,
.get_ro = tmio_mmc_get_ro, .get_ro = tmio_mmc_get_ro,
.get_cd = mmc_gpio_get_cd, .get_cd = mmc_gpio_get_cd,
.enable_sdio_irq = tmio_mmc_enable_sdio_irq, .enable_sdio_irq = tmio_mmc_enable_sdio_irq,
.multi_io_quirk = tmio_multi_io_quirk,
}; };
static int tmio_mmc_init_ocr(struct tmio_mmc_host *host) static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)

View File

@ -5,6 +5,7 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/mmc/card.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
@ -142,6 +143,8 @@ struct tmio_mmc_data {
/* clock management callbacks */ /* clock management callbacks */
int (*clk_enable)(struct platform_device *pdev, unsigned int *f); int (*clk_enable)(struct platform_device *pdev, unsigned int *f);
void (*clk_disable)(struct platform_device *pdev); void (*clk_disable)(struct platform_device *pdev);
int (*multi_io_quirk)(struct mmc_card *card,
unsigned int direction, int blk_size);
}; };
/* /*