thermal: exynos: replace tmu_irqstatus check by Exynos5440 one
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 13 Nov 2014 15:01:05 +0000 (16:01 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Thu, 20 Nov 2014 14:52:58 +0000 (10:52 -0400)
reg->tmu_irqstatus is set to non-zero value only for Exynos5440
so replace check for non-zero value of reg->tmu_irqstatus by
explicitly checking for Exynos5440 SoC type.  Then remove no
longer needed reg->tmu_irqstatus register abstraction.

There should be no functional changes caused by this patch.

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: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/samsung/exynos_tmu.c
drivers/thermal/samsung/exynos_tmu.h
drivers/thermal/samsung/exynos_tmu_data.c

index e35c2895b4ed906e4600605fdb44345575641e68..839b07bbcebf5a388e6446c894f6356567fd7fca 100644 (file)
@@ -407,15 +407,13 @@ static void exynos_tmu_work(struct work_struct *work)
 {
        struct exynos_tmu_data *data = container_of(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_type;
 
        if (!IS_ERR(data->clk_sec))
                clk_enable(data->clk_sec);
        /* Find which sensor generated this interrupt */
-       if (reg->tmu_irqstatus) {
-               val_type = readl(data->base_second + reg->tmu_irqstatus);
+       if (data->soc == SOC_ARCH_EXYNOS5440) {
+               val_type = readl(data->base_second + EXYNOS5440_TMU_IRQ_STATUS);
                if (!((val_type >> data->id) & 0x1))
                        goto out;
        }
index 2694298eef59f2315fc386298fa8cc9da7d36397..5c2cef1770dd5e8d7c8509cb072bf54d8dbebe4f 100644 (file)
@@ -92,7 +92,6 @@ enum soc_type {
  * @tmu_intstat: Register containing the interrupt status values.
  * @tmu_intclear: Register for clearing the raised interrupt status.
  * @emul_con: TMU emulation controller register.
- * @tmu_irqstatus: register to find which TMU generated interrupts.
  * @tmu_pmin: register to get/set the Pmin value.
  */
 struct exynos_tmu_registers {
@@ -118,7 +117,6 @@ struct exynos_tmu_registers {
 
        u32     emul_con;
 
-       u32     tmu_irqstatus;
        u32     tmu_pmin;
 };
 
index cef0b9744aefa8888953eb633714729b4c25e9b0..557b4a598b379b02536fd4e8ffc9921b4e08f917 100644 (file)
@@ -401,7 +401,6 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = {
        .inten_fall0_shift = EXYNOS5440_TMU_INTEN_FALL0_SHIFT,
        .tmu_intstat = EXYNOS5440_TMU_S0_7_IRQ,
        .tmu_intclear = EXYNOS5440_TMU_S0_7_IRQ,
-       .tmu_irqstatus = EXYNOS5440_TMU_IRQ_STATUS,
        .emul_con = EXYNOS5440_TMU_S0_7_DEBUG,
        .tmu_pmin = EXYNOS5440_TMU_PMIN,
 };