From: Qipan Li Date: Mon, 19 Aug 2013 03:47:53 +0000 (+0800) Subject: serial: sirf: add DMA support using dmaengine APIs X-Git-Tag: v3.12-rc1~182^2~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8316d04c42b94e94c8e54027d7c77ebe098ab5fa;p=pandora-kernel.git serial: sirf: add DMA support using dmaengine APIs if we get the valid dma channels from dts, move to use dmaengine to do rx/tx. because the dma hardware requires dma address and length to be 4bytes aligned, in this driver, we will still use PIO for non-aligned bytes, and use dma for aligned bytes. for rx, to keep the dmaengine always active, we use double-buffer, so we issue two dma_desc at first, and maintain the status of both 1. dma transfer done: update in rx dma finish callback 2. dma buffer is inserted into tty: update in rx dma finish tasklet and rx timeout tasklet so we re-issue the dma_desc only if both 1&2 are finished. for tx, as we know the actual length for every transfer, we don't need the above double buffering. Signed-off-by: Qipan Li Signed-off-by: Barry Song Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed