AnsweredAssumed Answered

bfin_sport.c driver mistake

Question asked by karak on Sep 15, 2017
Latest reply on Sep 17, 2017 by Aaronwu

Hi, I found a little mistake in bfin_sport driver. As mentioned on ADSP-BF537_hw_rev.3.4.pdf on page 12-12:
" When disabling the SPORT from multichannel operation, first disable TSPEN and then disable RSPEN . Note both TSPEN and RSPEN must be disabled before reenabling. Disabling only TX or RX is not allowed.
"

 

diff --git a/drivers/char/bfin_sport.c b/drivers/char/bfin_sport.c
index c9d002c..5c487ee 100644
--- a/drivers/char/bfin_sport.c
+++ b/drivers/char/bfin_sport.c
@@ -149,7 +149,7 @@ static irqreturn_t dma_rx_irq_handler(int irq, void *dev_id)
dev_dbg(dev->dev, "%s enter\n", __func__);
status = dev->regs->mcmc2;
if (status & MCMEN)
- dev->regs->rcr1 &= ~RSPEN;
+ dev->regs->tcr1 &= ~TSPEN;
dev->regs->rcr1 &= ~RSPEN;
SSYNC();
disable_dma(dev->dma_rx_chan);

Outcomes