Commit a8c83064 authored by Wolfram Sang's avatar Wolfram Sang Committed by Ulf Hansson

mmc: tmio: remove indirection of 'hw_reset' callback

After Yamada-san's refactorization introducing 'tmio_mmc_host_alloc', we
can populate mmc_ops directly and don't need a layer inbetween.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20200820132538.24758-4-wsa+renesas@sang-engineering.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 34e3211e
...@@ -178,7 +178,6 @@ struct tmio_mmc_host { ...@@ -178,7 +178,6 @@ struct tmio_mmc_host {
unsigned int direction, int blk_size); unsigned int direction, int blk_size);
int (*write16_hook)(struct tmio_mmc_host *host, int addr); int (*write16_hook)(struct tmio_mmc_host *host, int addr);
void (*reset)(struct tmio_mmc_host *host); void (*reset)(struct tmio_mmc_host *host);
void (*hw_reset)(struct tmio_mmc_host *host);
bool (*check_retune)(struct tmio_mmc_host *host); bool (*check_retune)(struct tmio_mmc_host *host);
/* /*
......
...@@ -709,14 +709,6 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host, ...@@ -709,14 +709,6 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host,
return 0; return 0;
} }
static void tmio_mmc_hw_reset(struct mmc_host *mmc)
{
struct tmio_mmc_host *host = mmc_priv(mmc);
if (host->hw_reset)
host->hw_reset(host);
}
static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode) static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
{ {
struct tmio_mmc_host *host = mmc_priv(mmc); struct tmio_mmc_host *host = mmc_priv(mmc);
...@@ -1008,7 +1000,6 @@ static struct mmc_host_ops tmio_mmc_ops = { ...@@ -1008,7 +1000,6 @@ static struct mmc_host_ops tmio_mmc_ops = {
.get_cd = tmio_mmc_get_cd, .get_cd = tmio_mmc_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, .multi_io_quirk = tmio_multi_io_quirk,
.hw_reset = tmio_mmc_hw_reset,
.execute_tuning = tmio_mmc_execute_tuning, .execute_tuning = tmio_mmc_execute_tuning,
}; };
......
...@@ -409,8 +409,9 @@ static void uniphier_sd_clk_disable(struct tmio_mmc_host *host) ...@@ -409,8 +409,9 @@ static void uniphier_sd_clk_disable(struct tmio_mmc_host *host)
clk_disable_unprepare(priv->clk); clk_disable_unprepare(priv->clk);
} }
static void uniphier_sd_hw_reset(struct tmio_mmc_host *host) static void uniphier_sd_hw_reset(struct mmc_host *mmc)
{ {
struct tmio_mmc_host *host = mmc_priv(mmc);
struct uniphier_sd_priv *priv = uniphier_sd_priv(host); struct uniphier_sd_priv *priv = uniphier_sd_priv(host);
reset_control_assert(priv->rst_hw); reset_control_assert(priv->rst_hw);
...@@ -597,7 +598,7 @@ static int uniphier_sd_probe(struct platform_device *pdev) ...@@ -597,7 +598,7 @@ static int uniphier_sd_probe(struct platform_device *pdev)
ret = PTR_ERR(priv->rst_hw); ret = PTR_ERR(priv->rst_hw);
goto free_host; goto free_host;
} }
host->hw_reset = uniphier_sd_hw_reset; host->ops.hw_reset = uniphier_sd_hw_reset;
} }
if (host->mmc->caps & MMC_CAP_UHS) { if (host->mmc->caps & MMC_CAP_UHS) {
......
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