]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00163603-2 IMX/SDMA : save the real count for one DMA transaction.
authorHuang Shijie <b32955@freescale.com>
Wed, 23 Nov 2011 08:45:17 +0000 (16:45 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:33 +0000 (08:33 +0200)
commit48e5afb31f7295cd69366f690ba567256de26769
treec5a0bb89fda5c189ec941cfa629815ec886521c1
parenta39b2a2a316690c2701654afa7ce86f9a25c23a2
ENGR00163603-2 IMX/SDMA : save the real count for one DMA transaction.

When we use the SDMA in the UART driver(such as imx6q), we will
meet one situation:
  Assume we set 64 bytes for the RX DMA buffer.
  The receiving DMA buffer has received some data, but not full.
  An Aging DMA request will be received by the SDMA controller if we enable the
  IDDMAEN(UCR4[6]) in this case.

So the UART driver needs to know the count of the real received bytes,
and push them to upper layer.

Add two new fields to sdmac, and update the `residue` in sdma_tx_status().

Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/dma/imx-sdma.c