Re: [PATCH 2/9] mmc: tmio: tmio_mmc_host has .dma

Arnd Bergmann
2015-01-06T13:19:36Z

On Tuesday 06 January 2015 02:38:53 Kuninori Morimoto wrote:
> Hi Arnd again
>
> > > > The alignment_shift and dma_rx_offset values seem to always be
> > > > the same for all users (at least the remaining ones, possibly there
> > > > were others originally), so you could hardcode those in tmio_mmc_dma.c
> > > > and remove the tmio_mmc_dma structure entirely.
> > >
> > > Unfortunately, alignment_shift and dma_rx_offset value are based on SoC.
> > > we can't hardcode these.
> >
> > Which SoCs use a different value here? Both of these look like
> > implementation details of the tmio_mmc, not of the integration
> > into the SoC, so they could just be keyed off the device identification.
>
> About .alignment_shift, it is not implemented today, but our new SoC
> want to use different value (= .alignment_shift = 5).

Ok, I see.

> About .dma_rx_offset, please check this
> ${LINUX}/drivers/mmc/host/sh_mobile_sdhi.c :: of_rcar_gen1_compatible
> ${LINUX}/drivers/mmc/host/sh_mobile_sdhi.c :: of_rcar_gen2_compatible
> or
> 384b2cbd56a02efb16358ed7c0c039e4afca5ed0
> (mmc: tmio: care about DMA tx/rx addr offset)

Right. How about moving these two into tmio_mmc_data then along with
the other members of tmio_mmc_dma?

Arnd