MLK-21443: dmaengine: fsl-edma-v3: clear pending irq before request irq
authorRobin Gong <yibin.gong@nxp.com>
Thu, 11 Apr 2019 06:36:37 +0000 (14:36 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Thu, 2 May 2019 08:35:32 +0000 (11:35 +0300)
commitae08768a40cad980e913bd5f6fe0996ba3165553
tree58b128de77984d37a2fa8d2a6b92df105ae24b69
parent3aaf2019e9e16d4dc9db37e71dd5a8400b73c530
MLK-21443: dmaengine: fsl-edma-v3: clear pending irq before request irq

edma interrupt maybe happened during reboot or watchdog reset, meanwhile
gic never power down on i.mx8QM/QXP, thus the unexpect irq will come in
once edma driver request irq at probe phase. Unfortunately, at that time
that edma channel's power domain which power-up by customer driver such
as audio/uart driver may not be ready, so kernel panic triggered once
touch such edma registers which still not power up in interrupt handler.
Move request irq from probe to alloc dma channel so that edma channel's
power domain has already been powered, besides, clear meaningless
interrupt before request irq.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 0a0d8f8b944094342fda18f23f3ac13b8a73871d)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit a6fa7853b4318a31df8c4f53068e5c68d6e0c4bd)
drivers/dma/fsl-edma-v3.c