diff options
author | Amit Daniel Kachhap <amit.daniel@samsung.com> | 2013-06-24 16:20:33 +0530 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-03-20 17:41:46 +0900 |
commit | 8c1fe60122d63fe1f0e5fe9499dc291abd3fb789 (patch) | |
tree | f045e1f14028f656f82d0ec1e344383592609da9 /drivers/thermal | |
parent | 86729e4fa3cc453f5aa9c7fe49b510969b586ba2 (diff) | |
download | linux-3.10-8c1fe60122d63fe1f0e5fe9499dc291abd3fb789.tar.gz linux-3.10-8c1fe60122d63fe1f0e5fe9499dc291abd3fb789.tar.bz2 linux-3.10-8c1fe60122d63fe1f0e5fe9499dc291abd3fb789.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')
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 11 | ||||
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu_data.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 33f494ea1ed..f6f63ca6faf 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); diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index 6cac3931088..217b8f522d3 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c @@ -45,6 +45,7 @@ static const struct exynos_tmu_registers exynos4210_tmu_registers = { .inten_rise1_shift = EXYNOS_TMU_INTEN_RISE1_SHIFT, .inten_rise2_shift = EXYNOS_TMU_INTEN_RISE2_SHIFT, .inten_rise3_shift = EXYNOS_TMU_INTEN_RISE3_SHIFT, + .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, }; struct exynos_tmu_platform_data const exynos4210_default_tmu_data = { @@ -112,6 +113,7 @@ static const struct exynos_tmu_registers exynos5250_tmu_registers = { .inten_rise2_shift = EXYNOS_TMU_INTEN_RISE2_SHIFT, .inten_rise3_shift = EXYNOS_TMU_INTEN_RISE3_SHIFT, .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, + .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, .emul_con = EXYNOS_EMUL_CON, .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, |