Re: set_dma_addr missing ?

Paul Mundt
2008-01-28T09:09:04Z

On Mon, Jan 28, 2008 at 09:48:59AM +0100, Francis Moreau wrote:
> On Jan 28, 2008 3:47 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> > On Sat, Jan 26, 2008 at 10:02:02PM +0100, Francis Moreau wrote:
> > > Sorry to be blind but I can't figure out why this function is missing
> > > for SH architecture ?
> > >
> > It's not "missing", it's only enabled if you specifically request support
> > for the ISA DMA API wrapper. It's a total kludge, since the SH DMAC has
> > very little in common with how ISA DMA works, but it's provided for
> > compatability anyways. If you're trying to use this API in a driver,
> > you're almost definitely doing the wrong thing.
>
> But what's the other alternative ?
>
> I have a DMA controller, which has very little in common with ISA DMA
> as you said.
> I'd like to use it from a generic driver. Which API should I use then ?
>
Well, there are two options, either using the existing SH DMA API, or
trying to hook something in through the dmaengine API. The latter is the
way that we'll be moving in the near future, but we do still need to keep
compatability with the existing SH DMA API around in order to avoid
breaking the existing in-tree users.

You may wish to poke around arch/sh/drivers/dma/. There are lots of
greppable things you can find in the rest of tree that show the API,
in-tree users, etc. Post if you have any problems.