Re: [PATCH 1/2] dmaengine: ep93xx: Always start from BASE0

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

 



Hello Vinod,

On 14/05/17 15:14, Vinod Koul wrote:
>> @@ -323,6 +331,10 @@ static int m2p_hw_setup(struct ep93xx_dma_chan *edmac)
>>  		| M2P_CONTROL_ENABLE;
>>  	m2p_set_control(edmac, control);
>>  
>> +	if (m2p_channel_nextbuf(edmac) != 0)
>> +		dev_warn(chan2dev(edmac), "M2P: Starting from BASE1\n");
> But then you are actually not restarting from BASE1 as you reset, so the
> warn is wrong.. Perhaps a more meaningful msg would be to say "expected 0
> but found 1, so resetting"

This is, maybe not so obvious, a warning, which should never fire. It just
proves, that I understand the HW correctly. As long as nobody sees the warning,
it's the case. And it proves that HW behaves according to user manual.
We can remove this warning completely.

Once again, the story is following:

- m2p_hw_setup() is always called after channel reset
- after reset channel expects to start from buffer 0
- therefore we must always start from buffer 0 <= this was not the case before
- we can read the expected "next buffer" from the controller => hence the warning
  maybe if there will be a bug somewhere and the channel will not be reset before
  next transfer, it will be triggered

Regards,
Alexander.



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]