|
@@ -911,6 +911,14 @@ static void dma_rx_callback(void *data)
|
|
|
|
|
|
|
|
status = dmaengine_tx_status(chan, (dma_cookie_t)0, &state);
|
|
status = dmaengine_tx_status(chan, (dma_cookie_t)0, &state);
|
|
|
count = RX_BUF_SIZE - state.residue;
|
|
count = RX_BUF_SIZE - state.residue;
|
|
|
|
|
+
|
|
|
|
|
+ if (readl(sport->port.membase + USR2) & USR2_IDLE) {
|
|
|
|
|
+ /* In condition [3] the SDMA counted up too early */
|
|
|
|
|
+ count--;
|
|
|
|
|
+
|
|
|
|
|
+ writel(USR2_IDLE, sport->port.membase + USR2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
dev_dbg(sport->port.dev, "We get %d bytes.\n", count);
|
|
dev_dbg(sport->port.dev, "We get %d bytes.\n", count);
|
|
|
|
|
|
|
|
if (count) {
|
|
if (count) {
|