Subject: DMA interrupts on EP9302
To: None <>
From: Alessandro <>
List: port-arm
Date: 01/27/2006 10:47:04
Hi, i am a student of engineering and i am working on my thesis but some days
ago i stopped couse i cannot solve this huge problem... 

PREFACE (if useful): My work is concering programming an EP9302 cirrus board for
doing the encapsulation of a MPEG2 transport stream from a satellite source to a
network based on the IP protocol. The main tasks of encapsulation are adquire
the MPEG2 TS (a collection of different video datas, audio datas, teletext
datas), demux each Program Stream (single video + single audio + single
teletext) , and “post” the selected Program stream towards an Ip address with
the RTP protocol.
I cannot use the GPIO ports cause they cannot manage the 27.5 Mhz Transport
stream (solution yet tested, too high processor use), so i decided to use the
DMA (direct memory access) to bypass the processor for datas but i still use the
GPIO for menaging the syncronization signal of the TS (clock, SYNC byte
[beginning of the TS] and the DEOT [end of the TS]). 
I made the transport stream available directly in the bus at the physical
address 0x30000000.
I am trying to do the adquisition task as a driver under linux.

The PROBLEM: there are 3 possible interrupts generated by the DMA controller
(DONE, STALL, NFB). The only one i am interested in is the DONE interrupt that
signals the end of each transfer completed successfully. After the detection of
the DONE, the interrupt handler (a routine in the kernel) starts and transfer
the packet to an other buffer in user space. 
BUT the it seems that i cannot set the DONE interrupt to start after 188 byte
incoming (size of a single TS packet). Insted it start every byte!! Of course,
menaging an interrupt each byte means a 27.5 Mhz interrupt generation....too
much... and everything crashes (the kernel stops working and i have to reboot)

Is it true that it's impossible to set the DONE interrupt to start each 188 byte
I mean: is it necessary that it starts every byte??

(i need to use the DMA controller with the M2M channel in the “external
peripherals with handshaking signals” mode)

I read the manual hundreds times but nothing...... 

Really thanks for any help!  Alessandro.