[COMMON] media: smfc: dump SFR when unexpected IRQ invoked
authorCho KyongHo <pullip.cho@samsung.com>
Mon, 18 May 2015 10:32:57 +0000 (19:32 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:31:03 +0000 (14:31 +0900)
Dumping SFR helps to debug unexpected IRQ.

Change-Id: I58aa822c127b8087beee5c521445a8f67e18db76
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
drivers/media/platform/exynos/smfc/smfc.c

index 7a2cc4343fbf9950b423f27b345158a1ef018641..3fd3e8360347a394bb7e208616ce41061f434148 100644 (file)
@@ -285,7 +285,10 @@ static irqreturn_t exynos_smfc_irq_handler(int irq, void *priv)
        u32 thumb_streamsize = smfc_get_2nd_streamsize(smfc);
        bool suspending = false;
 
-       BUG_ON(!(smfc->flags & SMFC_DEV_RUNNING));
+       if (!(smfc->flags & SMFC_DEV_RUNNING)) {
+               smfc_dump_registers(smfc);
+               BUG();
+       }
 
        spin_lock(&smfc->flag_lock);
        suspending = !!(smfc->flags & SMFC_DEV_SUSPENDING);