]> git.baikalelectronics.ru Git - kernel.git/commit
mxs/spi: clear XFER_COUNT in ctrl0 field in DMA descriptor
authorJuha Lumme <juha.lumme@gmail.com>
Wed, 26 Dec 2012 05:48:51 +0000 (14:48 +0900)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 5 Feb 2013 12:45:24 +0000 (12:45 +0000)
commitc28f7f863db30cf7eefd103a02e32a295e65a5c2
treeb1a9273542e5d139975317b6d02bbf718444c123
parent6bc7b50328717ca8ef41c89a1ede82d5d3ee806d
mxs/spi: clear XFER_COUNT in ctrl0 field in DMA descriptor

On MX23 the XFER_COUNT part in ctrl0 field in DMA descriptor was
improperly OR'd during the construction of DMA descriptor chain, instead
of being freshly set.  Because of that too many bytes were being
expected from SPI during the last DMA cycle.  This caused a timeout
(SSP_TIMEOUT) to happen in the processing of the last DMA descriptor,
and thus reads and writes were failing.  This is a fix for the problem,
by clearing XFER_COUNT bytes in ctrl0 before setting the new XFER_COUNT
for DMA descriptor.

Signed-off-by: Juha Lumme <juha.lumme@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi-mxs.c