• Bartlomiej Zolnierkiewicz's avatar
    thermal: exynos: fix IRQ clearing on TMU initialization · b835ced1
    Bartlomiej Zolnierkiewicz authored
    * Factor out code for clearing raised IRQs from exynos_tmu_work() to
      exynos_tmu_clear_irqs().
    
    * Add a comment about documentation bugs to exynos_tmu_clear_irqs().
    
      [ The documentation for Exynos3250, Exynos4412, Exynos5250 and
        Exynos5260 incorrectly states that INTCLEAR register has
        a different placing of bits responsible for FALL IRQs than
        INTSTAT register.  Exynos5420 and Exynos5440 documentation is
        correct (Exynos4210 doesn't support FALL IRQs at all). ]
    
    * Use exynos_tmu_clear_irqs() in exynos_tmu_initialize() instead
      of open-coded code trying to clear IRQs according to predefined
      masks.  After this change exynos_tmu_initialize() just clears
      IRQs that are raised like it is already done in exynos_tmu_work().
    
      As a nice side-effect the code now uses the correct offset
      (16 instead of 12) for bits responsible for clearing FALL IRQs
      in INTCLEAR register on Exynos3250, Exynos4412 and Exynos5250.
    
    * Remove no longer needed intclr_rise_[mask,shift] and
      intclr_fall_[mask,shift] fields from struct exynos_tmu_registers.
    
    * Remove no longer needed defines.
    
    This patch has been tested on Exynos4412 and Exynos5420 SoCs.
    
    Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
    Cc: Lukasz Majewski <l.majewski@samsung.com>
    Cc: Eduardo Valentin <edubezval@gmail.com>
    Cc: Zhang Rui <rui.zhang@intel.com>
    Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
    b835ced1
exynos_tmu_data.c 15.2 KB