Re: [PATCH 1/7] mmc: tmio: add .enable_dma

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ulf

> On 15 December 2014 at 03:27, Kuninori Morimoto
> <kuninori.morimoto.gx@xxxxxxxxxxx> wrote:
> > From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> >
> > Some controllers need DMA special register/setting.
> > This patch adds new .enable_dma callback for it.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> > ---
> >  drivers/mmc/host/tmio_mmc_dma.c |    3 +++
> >  include/linux/mfd/tmio.h        |    4 ++--
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
> > index 7d07738..f0bf6df 100644
> > --- a/drivers/mmc/host/tmio_mmc_dma.c
> > +++ b/drivers/mmc/host/tmio_mmc_dma.c
> > @@ -30,6 +30,9 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable)
> >
> >         if (host->pdata->flags & TMIO_MMC_HAVE_CTL_DMA_REG)
> >                 sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
> > +
> > +       if (host->pdata->dma->enable)
> > +               host->pdata->dma->enable(host, enable);
> >  }
> >
> >  void tmio_mmc_abort_dma(struct tmio_mmc_host *host)
> > diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> > index 5738817..6788f9b 100644
> > --- a/include/linux/mfd/tmio.h
> > +++ b/include/linux/mfd/tmio.h
> > @@ -111,6 +111,7 @@ void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state);
> >  void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);
> >
> >  struct dma_chan;
> > +struct tmio_mmc_host;
> >
> >  struct tmio_mmc_dma {
> >         void *chan_priv_tx;
> > @@ -120,10 +121,9 @@ struct tmio_mmc_dma {
> >         int alignment_shift;
> >         dma_addr_t dma_rx_offset;
> >         bool (*filter)(struct dma_chan *chan, void *arg);
> > +       void (*enable)(struct tmio_mmc_host *host, bool enable);
> 
> Before we decide to add more callbacks to this struct, can we please
> try to move the mmc specific parts into the mmc tmio specific header?
> drivers/mmc/host/tmio_mmc.h.
> 
> For example the tmio_mmc_dma can be moved there.

OK, I understand
Will do

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux