Re: [PATCH v17 2/4] dmaengine: tegra: Add tegra gpcdma driver

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

 



30.01.2022 13:08, Dmitry Osipenko пишет:
> 30.01.2022 13:05, Dmitry Osipenko пишет:
>> static int tegra_dma_device_resume(struct dma_chan *dc)
>> {
>> 	struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
>> 	u32 val;
>>
>> 	if (!tdc->tdma->chip_data->hw_support_pause)
>> 		return -ENOSYS;
>>
>> 	if (!tdc->dma_desc)
>> 		return 0;
>>
>> 	val = tdc_read(tdc, TEGRA_GPCDMA_CHAN_CSRE);
>> 	val &= ~TEGRA_GPCDMA_CHAN_CSRE_PAUSE;
>> 	tdc_write(tdc, TEGRA_GPCDMA_CHAN_CSRE, val);
>> 	
>> 	enable_irq(tdc->irq);
> 
> Correction:
> 
> if (tdc->dma_desc) {
> 	val = tdc_read(tdc, TEGRA_GPCDMA_CHAN_CSRE);
> 	val &= ~TEGRA_GPCDMA_CHAN_CSRE_PAUSE;
> 	tdc_write(tdc, TEGRA_GPCDMA_CHAN_CSRE, val);
> }
> 
> enable_irq(tdc->irq);

And apparently, tegra_dma_terminate_all() also needs to take care of
removing the PAUSE bit. Otherwise it won't be possible to unpause
channel after the termination.



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux