diff options
author | Amit Daniel Kachhap <amit.daniel@samsung.com> | 2013-06-24 12:50:33 +0200 |
---|---|---|
committer | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-08-13 15:52:01 +0200 |
commit | a4463c4f669ac776a1f456fb51fd3c8c99ef904f (patch) | |
tree | eb67cf2c8e413e35dcc3d6e8be1c46b63d8da51c /drivers/thermal/samsung/exynos_tmu.c | |
parent | thermal: exynos: Support thermal tripping (diff) | |
download | linux-a4463c4f669ac776a1f456fb51fd3c8c99ef904f.tar.xz linux-a4463c4f669ac776a1f456fb51fd3c8c99ef904f.zip |
thermal: exynos: Fix to clear only the generated interrupts
This patch uses the TMU status register to know the generated interrupts
and only clear them in the interrupt handler.
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Diffstat (limited to 'drivers/thermal/samsung/exynos_tmu.c')
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 33f494ea1ed1..f6f63ca6faf3 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -351,17 +351,16 @@ static void exynos_tmu_work(struct work_struct *work) struct exynos_tmu_data, irq_work); struct exynos_tmu_platform_data *pdata = data->pdata; const struct exynos_tmu_registers *reg = pdata->registers; + unsigned int val_irq; exynos_report_trigger(); mutex_lock(&data->lock); clk_enable(data->clk); - if (data->soc == SOC_ARCH_EXYNOS) - writel((reg->inten_rise_mask << reg->inten_rise_shift) | - (reg->inten_fall_mask << reg->inten_fall_shift), - data->base + reg->tmu_intclear); - else - writel(reg->inten_rise_mask, data->base + reg->tmu_intclear); + /* TODO: take action based on particular interrupt */ + val_irq = readl(data->base + reg->tmu_intstat); + /* clear the interrupts */ + writel(val_irq, data->base + reg->tmu_intclear); clk_disable(data->clk); mutex_unlock(&data->lock); |