• David Brownell's avatar
    EDMA: code shrinkage · fd4c7dfe
    David Brownell authored
    Use memcpy_{from,to}io() to read and write entire parameter RAM
    slots, saving a surprising 268 bytes over the existing code.
    Renames those parameters to be more sensible than "temp".
    
    Fix a minor glitch and ensure all DMA channels are initialized with
    a dummy transfer with all options zeroed, so it's not possible to
    accidentally start getting intermediate completion callbacks or
    event chaining by accident.  Save eight bytes while doing that.
    
    Shrink davinci_stop_dma() by not testing if the bits are already
    cleared; if they were, clearing again is harmless.  And shrink
    map_dmach_queue() by avoiding a superfluous test.
    
    EDMA runtime code footprint is now under 2700 bytes, and there
    are still further cleanups that could be done...
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
    fd4c7dfe
dma.c 33.3 KB