[PATCH] IMX/SDMA : save the real count for one DMA transaction.
Huang Shijie
b32955 at freescale.com
Wed Nov 23 21:56:18 EST 2011
于 2011年11月23日 19:36, Wolfram Sang 写道:
> On Wed, Nov 23, 2011 at 07:29:20PM +0800, Huang Shijie wrote:
>>> On Wed, Nov 23, 2011 at 07:13:23PM +0800, Huang Shijie wrote:
>>>>>>>> + /* save the real count we received or transmitted. */
>>>>>>>> + chan->private = (void *)count;
>>>>>>> And if someone later needs another variable which is private?
>>>>>>>
>>>>>> I ever wanted to add an new parameter `void *` to dma_aync_tx_callback,
>>>>>> but it seemed i have
>>>>>> to change a lot of files.
>>>>>>
>>>>>> Do you have any better suggestion?
>>>>> Use a private struct and put count in there.
>>>>>
>>>> Where to put the private struct? in the imx-sdma.c ?
>>>> If i put it there, how can i get it in the UART driver with the current
>>>> DMA API?
>>> So, in the UART driver you assume that void* is an int? Or how do you
>>> currently use count?
>>>
>> In the UART driver, I use the following lines:
>> -------------------------------------------------------
>> + struct dma_chan *chan = sport->dma_chan_rx;
>> + unsigned int count = (unsigned int)chan->private;
>> -------------------------------------------------------
> And why can't you use a struct here? chan->private->count?
>
> Even then, I doubt if you can get this into mainline. But when you try,
I wish to post the UART code as well as this patch.
But the PINMUX driver of mx6q is not ready now(so do the mx23/28).
I have to send out this single patch now.
thanks.
Huang Shijie
> please always post a user for this change (or a reference to it), that
> is, the uart-driver. Otherwise there is no reason to include a change.
>
> Regards,
>
> Wolfram
>
>
More information about the linux-arm-kernel
mailing list