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 <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
Kuninori Morimoto 2015-01-13 04:57:42 +00:00 • committed by Ulf Hansson
commit dfe9a229e0
4 changed files with 5 additions and 6 deletions

View file

@ -214,11 +214,11 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
}
host->dma = dma_priv;
host->write16_hook = sh_mobile_sdhi_write16_hook;
mmc_data->clk_enable = sh_mobile_sdhi_clk_enable;
mmc_data->clk_disable = sh_mobile_sdhi_clk_disable;
mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED;
mmc_data->write16_hook = sh_mobile_sdhi_write16_hook;
mmc_data->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk;
if (p) {
mmc_data->flags = p->tmio_flags;

View file

@ -94,6 +94,8 @@ struct tmio_mmc_host {
struct mutex ios_lock; /* protect set_ios() context */
bool native_hotplug;
bool sdio_irq_enabled;
int (*write16_hook)(struct tmio_mmc_host *host, int addr);
};
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
/* If there is a hook and it returns non-zero then there
* is an error and the write should be skipped
*/
if (host->pdata->write16_hook && host->pdata->write16_hook(host, addr))
if (host->write16_hook && host->write16_hook(host, addr))
return;
writew(val, host->ctl + (addr << host->pdata->bus_shift));
}

View file

@ -1092,7 +1092,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
tmio_mmc_of_parse(pdev, pdata);
if (!(pdata->flags & TMIO_MMC_HAS_IDLE_WAIT))
pdata->write16_hook = NULL;
_host->write16_hook = NULL;
res_ctl = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res_ctl)