Message ID | 1556255930-18188-2-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mmc: renesas_sdhi_internal_dmac: improve performance by using IOMMU | expand |
On Fri, Apr 26, 2019 at 02:18:48PM +0900, Yoshihiro Shimoda wrote: > Since renesas_sdhi_internal_dmac driver would like to use > the init_card() ops in the future, this patch adds init_card ops > into the struct tmio_mmc_host and struct tmio_mmc_dma_ops. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Yamada-san refactored the code, so we don't need such hooks in the TMIO part anymore. Check 2aaa3c5193db ("mmc: tmio, renesas_sdhi: set mmc_host_ops hooks directly") for an example. I will comment further in patch 3.
On Fri, Apr 26, 2019 at 02:18:48PM +0900, Yoshihiro Shimoda wrote: > Since renesas_sdhi_internal_dmac driver would like to use > the init_card() ops in the future, this patch adds init_card ops > into the struct tmio_mmc_host and struct tmio_mmc_dma_ops. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
On Fri, Apr 26, 2019 at 11:45:01AM +0200, Simon Horman wrote: > On Fri, Apr 26, 2019 at 02:18:48PM +0900, Yoshihiro Shimoda wrote: > > Since renesas_sdhi_internal_dmac driver would like to use > > the init_card() ops in the future, this patch adds init_card ops > > into the struct tmio_mmc_host and struct tmio_mmc_dma_ops. > > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Don't you think this not needed anymore in context with all the refactoring around 2aaa3c5193db ("mmc: tmio, renesas_sdhi: set mmc_host_ops hooks directly")?
On Fri, Apr 26, 2019 at 11:56:00AM +0200, Wolfram Sang wrote: > On Fri, Apr 26, 2019 at 11:45:01AM +0200, Simon Horman wrote: > > On Fri, Apr 26, 2019 at 02:18:48PM +0900, Yoshihiro Shimoda wrote: > > > Since renesas_sdhi_internal_dmac driver would like to use > > > the init_card() ops in the future, this patch adds init_card ops > > > into the struct tmio_mmc_host and struct tmio_mmc_dma_ops. > > > > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > > > Reviewed-by: Simon Horman <horms+renesas@verge.net.au> > > Don't you think this not needed anymore in context with all the > refactoring around 2aaa3c5193db ("mmc: tmio, renesas_sdhi: set > mmc_host_ops hooks directly")? Yes, true.
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index c5ba13f..cb2c42b 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h @@ -118,6 +118,7 @@ struct tmio_mmc_dma_ops { void (*release)(struct tmio_mmc_host *host); void (*abort)(struct tmio_mmc_host *host); void (*dataend)(struct tmio_mmc_host *host); + void (*init_card)(struct tmio_mmc_host *host, struct mmc_card *card); }; struct tmio_mmc_host { @@ -178,6 +179,7 @@ struct tmio_mmc_host { void (*hw_reset)(struct tmio_mmc_host *host); void (*prepare_tuning)(struct tmio_mmc_host *host, unsigned long tap); bool (*check_scc_error)(struct tmio_mmc_host *host); + void (*init_card)(struct tmio_mmc_host *host, struct mmc_card *card); /* * Mandatory callback for tuning to occur which is optional for SDR50 diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 130b91c..6019628 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1047,6 +1047,14 @@ static void tmio_mmc_hs400_complete(struct mmc_host *mmc) host->hs400_complete(host); } +static void tmio_mmc_init_card(struct mmc_host *mmc, struct mmc_card *card) +{ + struct tmio_mmc_host *host = mmc_priv(mmc); + + if (host->init_card) + host->init_card(host, card); +} + static const struct mmc_host_ops tmio_mmc_ops = { .request = tmio_mmc_request, .set_ios = tmio_mmc_set_ios, @@ -1059,6 +1067,7 @@ static const struct mmc_host_ops tmio_mmc_ops = { .prepare_hs400_tuning = tmio_mmc_prepare_hs400_tuning, .hs400_downgrade = tmio_mmc_hs400_downgrade, .hs400_complete = tmio_mmc_hs400_complete, + .init_card = tmio_mmc_init_card, }; static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)
Since renesas_sdhi_internal_dmac driver would like to use the init_card() ops in the future, this patch adds init_card ops into the struct tmio_mmc_host and struct tmio_mmc_dma_ops. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/mmc/host/tmio_mmc.h | 2 ++ drivers/mmc/host/tmio_mmc_core.c | 9 +++++++++ 2 files changed, 11 insertions(+)