Re: [PATCH V2] dmaengine: sprd: Support two-stage dma interrupt
From: Baolin Wang
Date: Thu Oct 20 2022 - 21:35:28 EST
On 10/20/2022 7:22 PM, Vinod Koul wrote:
On 20-10-22, 16:15, Baolin Wang wrote:
why is sprd_dma_int_type part of driver interface. sprd_dma_int_type is
used only by this driver and should be moved into the driver..
Now we can not move this into dma driver, since we have some drivers in the
mainline will set the DMA interrupt type, such as spi-sprd.c, sprd_serial.c
and sprd-pcm-compress.c.
That may not sound right.. Why should peripheral set the DMA
interrupt..?
That's because SPRD DMA controller supplies several different interrupt
types for different scenarios of users, for example:
@SPRD_DMA_FRAG_INT: fragment done interrupt when one fragment request is
done.
@SPRD_DMA_BLK_INT: block done interrupt when one block request is done.
@SPRD_DMA_BLK_FRAG_INT: block and fragment interrupt when one fragment
or one block request is done.
@SPRD_DMA_TRANS_INT: tansaction done interrupt when one transaction
request is done.
......
Some users may want use Linklist interrupt, and others may just want
tansaction interrupt. So exposing these interrupt types for users to
decide seems more suitable.