• Richard Zhao's avatar
    dma/imx-sdma: convernt to use bit ops · 0bbc1413
    Richard Zhao authored
    We don't need extra lock, so we use non-atomic bit ops to set/clear bits,
    
    merge event_mask0 and event_mask1 into an array, it helps use bit ops.
    
    It also fixs the issue:
    
    sdmac->event_mask0 = 1 << sdmac->event_id0;
    sdmac->event_mask1 = 1 << (sdmac->event_id0 - 32);
    
    It event_id0 < 32, it shifts negative number. If event_id0 >= 32, it
    shifts number >= sizeof(int). Both the cases behavior is undefined.
    Signed-off-by: default avatarRichard Zhao <richard.zhao@linaro.org>
    Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
    0bbc1413
imx-sdma.c 36 KB