2010-10-20 09:50:07 Using SPORT 0 and SPORT 1 simultaneously in BF537
Shyam sundar (INDIA)
Message: 94781
Hello world,
I want to use SPORT 0 and SPORT 1 simultaneously in the userspace for the BF537 processor!!
I have enabled the SPORT usage in raw mode. How can utilise both SPORTS to work simultaneously?
Can I get any clue?
QuoteReplyEditDelete
2010-10-20 14:34:36 Re: Using SPORT 0 and SPORT 1 simultaneously in BF537
Mike Frysinger (UNITED STATES)
Message: 94784
there are two device nodes in /dev. one for each sport.
QuoteReplyEditDelete
2010-10-21 00:38:35 Re: Using SPORT 0 and SPORT 1 simultaneously in BF537
Shyam sundar (INDIA)
Message: 94789
Hi Mike,
I want to use both the SPORT in auto buffer mode with DMA channels,where in I can copy the data from SPORT dma rx buffer into the userspace memory whenever I do get receieve data and put the data into SPORT dma tx buffer.I hope I am clear in my question.I want to clear the DMA_IRQ_STATUS bit manually in the userspace so that I can process on the data. The read and write operations for SPORT are in blocked mode,because of which I am not able to use SPORT0 and SPORT1 simultaneously.
QuoteReplyEditDelete
2010-10-21 00:54:08 Re: Using SPORT 0 and SPORT 1 simultaneously in BF537
Sonic Zhang (CHINA)
Message: 94791
You didn't describe you use case clearly. Why do you need to use both simultaneously?
The simple bfin_sport.c driver is not designed for concurrently reading/writing. You have to enhance this function.
QuoteReplyEditDelete
2010-10-21 03:41:53 Re: Using SPORT 0 and SPORT 1 simultaneously in BF537
Shyam sundar (INDIA)
Message: 94807
Hi Sonic Zhang,
I do need one SPORT interface for recording and transmitting voice samples and other SPORT interface for voice communication for a modem.So from that point of view I need to have both SPORT working simultaneously.Trying to work around the sport driver!!
QuoteReplyEditDelete
2010-10-22 05:56:01 Re: Using SPORT 0 and SPORT 1 simultaneously in BF537
Shyam sundar (INDIA)
Message: 94868
Hello world,
I am trying to use SPORT 0 in dma mode and SPORT 1 in non-dma mode simultaneously
Currently, I dont want to do any transmit or receive on SPORT 1.I just want SPORT 1 clock generated which I can feed it to a codec(The codec should have been given the clock externally,but unfortunately its connected to SPORT 1 serial clock).I will be transmitting data to codec using SPORT 0
In the uClinux-dist/linux-2.6.x/drivers/char/bfin_sport.c file, I tried to add these statements
case 2:
if (copy_from_user(&config, (void *)arg, sizeof(config)))
return -EFAULT;
if (sport_configure(dev, &config) < 0)
return -EFAULT;
dev->regs->tcr1 |= TSPEN;
break;
And commented the routines in
static irqreturn_t sport_tx_handler(int irq, void *dev_id) and static irqreturn_t sport_rx_handler(int irq, void *dev_id),ie I am just returning from the interrupt handler without doing anything.
I do get sport 1 status error: TUVF
Can I get any help regarding this?
QuoteReplyEditDelete
2010-11-01 02:09:09 Re: Using SPORT 0 and SPORT 1 simultaneously in BF537
Shyam sundar (INDIA)
Message: 95431
Finally was able to make things work!
I modified the sport driver and just configured SPORT1 in autobuffer mode.
Thanks a lot for the support !!