diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-01-12 23:57:42 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-20 04:22:17 -0500 |
commit | dfe9a229e0a66b6a00439cea2885ad3b5d3e0840 (patch) | |
tree | 3ba6efbb82b31fa69a98df9bd81b3168de110a58 /drivers/mmc | |
parent | 7ecc09bab1e856e6730a4dd8a3bc1c28bb6ab3be (diff) |
mmc: tmio: tmio_mmc_host has .write16_hook
Current .write16_hook is implemented under tmio_mmc_data.
It goes to tmio_mmc_host by this patch.
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sh_mobile_sdhi.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc.h | 4 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc_pio.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 288e78d2c7a1..77ff0620912e 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c | |||
@@ -214,11 +214,11 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) | |||
214 | } | 214 | } |
215 | 215 | ||
216 | host->dma = dma_priv; | 216 | host->dma = dma_priv; |
217 | host->write16_hook = sh_mobile_sdhi_write16_hook; | ||
217 | 218 | ||
218 | mmc_data->clk_enable = sh_mobile_sdhi_clk_enable; | 219 | mmc_data->clk_enable = sh_mobile_sdhi_clk_enable; |
219 | mmc_data->clk_disable = sh_mobile_sdhi_clk_disable; | 220 | mmc_data->clk_disable = sh_mobile_sdhi_clk_disable; |
220 | mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; | 221 | mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; |
221 | mmc_data->write16_hook = sh_mobile_sdhi_write16_hook; | ||
222 | mmc_data->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; | 222 | mmc_data->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; |
223 | if (p) { | 223 | if (p) { |
224 | mmc_data->flags = p->tmio_flags; | 224 | mmc_data->flags = p->tmio_flags; |
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index 49a2559ff489..3fa96b11f76c 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
@@ -94,6 +94,8 @@ struct tmio_mmc_host { | |||
94 | struct mutex ios_lock; /* protect set_ios() context */ | 94 | struct mutex ios_lock; /* protect set_ios() context */ |
95 | bool native_hotplug; | 95 | bool native_hotplug; |
96 | bool sdio_irq_enabled; | 96 | bool sdio_irq_enabled; |
97 | |||
98 | int (*write16_hook)(struct tmio_mmc_host *host, int addr); | ||
97 | }; | 99 | }; |
98 | 100 | ||
99 | struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev); | 101 | struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev); |
@@ -183,7 +185,7 @@ static inline void sd_ctrl_write16(struct tmio_mmc_host *host, int addr, u16 val | |||
183 | /* If there is a hook and it returns non-zero then there | 185 | /* If there is a hook and it returns non-zero then there |
184 | * is an error and the write should be skipped | 186 | * is an error and the write should be skipped |
185 | */ | 187 | */ |
186 | if (host->pdata->write16_hook && host->pdata->write16_hook(host, addr)) | 188 | if (host->write16_hook && host->write16_hook(host, addr)) |
187 | return; | 189 | return; |
188 | writew(val, host->ctl + (addr << host->pdata->bus_shift)); | 190 | writew(val, host->ctl + (addr << host->pdata->bus_shift)); |
189 | } | 191 | } |
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 396be0e95a98..58f4e47aac8c 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c | |||
@@ -1092,7 +1092,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, | |||
1092 | tmio_mmc_of_parse(pdev, pdata); | 1092 | tmio_mmc_of_parse(pdev, pdata); |
1093 | 1093 | ||
1094 | if (!(pdata->flags & TMIO_MMC_HAS_IDLE_WAIT)) | 1094 | if (!(pdata->flags & TMIO_MMC_HAS_IDLE_WAIT)) |
1095 | pdata->write16_hook = NULL; | 1095 | _host->write16_hook = NULL; |
1096 | 1096 | ||
1097 | res_ctl = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1097 | res_ctl = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1098 | if (!res_ctl) | 1098 | if (!res_ctl) |