]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: stm32-dma: properly mask irq bits
authorPierre Yves MORDRET <pierre-yves.mordret@st.com>
Tue, 13 Mar 2018 16:42:05 +0000 (17:42 +0100)
committerVinod Koul <vinod.koul@intel.com>
Wed, 4 Apr 2018 06:19:36 +0000 (11:49 +0530)
commitf8dc3bd8b8cc01f58b61f8b82d0ba4f32f202fcb
tree218fd78c96a1d64503db268c16ce5646f9326921
parentde3ab06f30d750ec199a9181ad53a5b8c10d78df
dmaengine: stm32-dma: properly mask irq bits

A single register of the controller holds the information for four dma
channels.
The functions stm32_dma_irq_status() don't mask the relevant bits after
the shift, thus adjacent channel's status is also reported in the returned
value.
Fixed by masking the value before returning it.

Similarly, the function stm32_dma_irq_clear() don't mask the input value
before shifting it, thus an incorrect input value could disable the
interrupts of adjacent channels.
Fixed by masking the input value before using it.

Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/stm32-dma.c