EDMA: split channel/slot resource management
EDMA interface update for channel and parameter RAM slot alloc/free. This is the biggest of these changes, since it's non-cosmetic. - Stop talking about "master" and "slave"! Instead, use the notions exposed by the hardware: a DMA "channel", and a PaRAM slot. This is a general doc/comment update, and affects calling conventions. - Split davinci_request_dma() into two simpler routines: * edma_alloc_channel() with three fewer parameters * edma_alloc_slot() with just one parameter (may be a wildcard) The test for successful returns is "value < 0", not "value != 0"; non-negative values are the returned channel or slot number. - Split davinci_free_dma() into two routines, both of which update the now-free parameter RAM slot to hold a dummy transfer. * void edma_free_channel(unsigned channel) * void edma_free_slot(unsigned slot); - Fill all PaRAM slots with dummy transfers when they're not in use. - Change the channel and slot numbers to "unsigned" in some cases so we can avoid some tests for invalid parameters. A key notion here is to *stop* fuzzing distinctions between DMA channels and parameter RAM slots. This makes it easier to match these calls to hardware docs, and harder to get confused by differences; channels are (potentially) active, while slots are always passive. Transfer Completion Code (TCC) values are no longer supported except through the calls which manipulate entire parameter RAM sets. This means that completion IRQ setup (for audio) is a bit different. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Showing
This diff is collapsed.
Please register or sign in to comment