Hi,
I'm trying to trigger a DMA transfer (GPMC to SDRAM) from an external pin (pinmux'ed as dmareq2), i.e. hardware synchronized transfer.
Configuring the pin as GPIO I receive interrupts as expected, and I can start the DMA from the interrupt handler.
What I've gathered so far:
- In addition to the pinmuxing, I have to specify the trigger, sync mode, and src/dst sync in the call to omap_set_dma_transfer_params.
- I need to set flank/level trigging for dmareq2 in CONTROL_DEVCONF1.
Question:
- Do I need to omap_request_dma(OMAP24XX_DMA_EXT_DMAREQ2) and start the channel?
I'm having a hard time wrapping my head around the idea of a pin magically becoming a DMA channel that acts as a trigger of another DMA channel.
Looking at a couple of other drivers (mmc/host/omap.c and tusb6010_omap.c), they request the DMA channel corresponding to the "sync_dev". tusb6010_omap.c also uses the OMAP24XX_DMA_EXT_DMAREQ channels. In the 3730 TRM, 11.2.2 External SDMA Requests Typical Application, the figure quite clearly shows the connection between the pin and a corresponding DMA channel.
This is on OMAP 3730, 2.6.32 kernel.
Thanks,
Orjan