[PATCH 1/5] ARM: define the PrimeCell DMA API

Linus WALLEIJ linus.walleij at stericsson.com
Wed Mar 24 18:13:52 EDT 2010


[Dan]

> What are your semantics for keeping the transaction information alive
> until it gets consumed.  Currently the dma_ctrl_flags have the
> DMA_CTRL_ACK bit to specify that the descriptor not be
> recycled/destroyed until the client has a chance to attach a dependent
> operation.  Seems you need something similar to indicate that the
> residue information not be destroyed until it is consumed.  In other
> words how does a client guarantee that the engine provides the
> information it needs?

Well exactly to avoid that kind of trouble I STOP (or PAUSE),
get numer of bytes left, then terminate in that order. This
keeps the descriptor.

Perhaps it's better to keep the two functions _pause() and
_get_residue() and indicate that device_terminate_all()
may destroy the state.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list