Commit 4fe2ec57 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Ulf Hansson

mmc: tmio: tmio_mmc_host has .clk_enable

Current .clk_enable is implemented under tmio_mmc_data.
It goes to tmio_mmc_host by this patch.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent dfe9a229
...@@ -215,8 +215,8 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) ...@@ -215,8 +215,8 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
host->dma = dma_priv; host->dma = dma_priv;
host->write16_hook = sh_mobile_sdhi_write16_hook; host->write16_hook = sh_mobile_sdhi_write16_hook;
host->clk_enable = sh_mobile_sdhi_clk_enable;
mmc_data->clk_enable = sh_mobile_sdhi_clk_enable;
mmc_data->clk_disable = sh_mobile_sdhi_clk_disable; mmc_data->clk_disable = sh_mobile_sdhi_clk_disable;
mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED;
mmc_data->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; mmc_data->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk;
......
...@@ -96,6 +96,7 @@ struct tmio_mmc_host { ...@@ -96,6 +96,7 @@ struct tmio_mmc_host {
bool sdio_irq_enabled; bool sdio_irq_enabled;
int (*write16_hook)(struct tmio_mmc_host *host, int addr); int (*write16_hook)(struct tmio_mmc_host *host, int addr);
int (*clk_enable)(struct platform_device *pdev, unsigned int *f);
}; };
struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev); struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev);
......
...@@ -835,13 +835,12 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) ...@@ -835,13 +835,12 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
static int tmio_mmc_clk_update(struct tmio_mmc_host *host) static int tmio_mmc_clk_update(struct tmio_mmc_host *host)
{ {
struct mmc_host *mmc = host->mmc; struct mmc_host *mmc = host->mmc;
struct tmio_mmc_data *pdata = host->pdata;
int ret; int ret;
if (!pdata->clk_enable) if (!host->clk_enable)
return -ENOTSUPP; return -ENOTSUPP;
ret = pdata->clk_enable(host->pdev, &mmc->f_max); ret = host->clk_enable(host->pdev, &mmc->f_max);
if (!ret) if (!ret)
mmc->f_min = mmc->f_max / 512; mmc->f_min = mmc->f_max / 512;
......
...@@ -126,7 +126,6 @@ struct tmio_mmc_data { ...@@ -126,7 +126,6 @@ struct tmio_mmc_data {
void (*set_pwr)(struct platform_device *host, int state); void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state); void (*set_clk_div)(struct platform_device *host, int state);
/* clock management callbacks */ /* clock management callbacks */
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, int (*multi_io_quirk)(struct mmc_card *card,
unsigned int direction, int blk_size); unsigned int direction, int blk_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment