thermal: exynos: replace tmu_pmin check by Exynos5440 one
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 13 Nov 2014 15:01:06 +0000 (16:01 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Thu, 20 Nov 2014 14:53:01 +0000 (10:53 -0400)
reg->tmu_pmin is set to non-zero value only for Exynos5440
so replace check for non-zero value of reg->tmu_pmin by
explicitly checking for Exynos5440 SoC type.  Then remove no
longer needed reg->tmu_pmin 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 839b07bbcebf5a388e6446c894f6356567fd7fca..411c4650353ef32997f85e92c7a9563b75f1f321 100644 (file)
@@ -271,8 +271,8 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
                }
        }
        /*Clear the PMIN in the common TMU register*/
-       if (reg->tmu_pmin && !data->id)
-               writel(0, data->base_second + reg->tmu_pmin);
+       if (data->soc == SOC_ARCH_EXYNOS5440 && !data->id)
+               writel(0, data->base_second + EXYNOS5440_TMU_PMIN);
 out:
        clk_disable(data->clk);
        mutex_unlock(&data->lock);
index 5c2cef1770dd5e8d7c8509cb072bf54d8dbebe4f..e8510aaceb05ccba507950b5178417289108d09a 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_pmin: register to get/set the Pmin value.
  */
 struct exynos_tmu_registers {
        u32     tmu_ctrl;
@@ -116,8 +115,6 @@ struct exynos_tmu_registers {
        u32     tmu_intclear;
 
        u32     emul_con;
-
-       u32     tmu_pmin;
 };
 
 /**
index 557b4a598b379b02536fd4e8ffc9921b4e08f917..fe063d486ea45f2d45b26767a8fff2c8c6efbc9c 100644 (file)
@@ -402,7 +402,6 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = {
        .tmu_intstat = EXYNOS5440_TMU_S0_7_IRQ,
        .tmu_intclear = EXYNOS5440_TMU_S0_7_IRQ,
        .emul_con = EXYNOS5440_TMU_S0_7_DEBUG,
-       .tmu_pmin = EXYNOS5440_TMU_PMIN,
 };
 
 #define EXYNOS5440_TMU_DATA \