Commit fac36bac authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Eduardo Valentin

thermal: exynos: move IRQs clearing to exynos_tmu_initialize()

Move ->tmu_clear_irqs call from ->tmu_initialize method to
exynos_tmu_initialize().

There should be no functional changes caused by this patch.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 736b11d1
...@@ -366,10 +366,12 @@ static int exynos_tmu_initialize(struct platform_device *pdev) ...@@ -366,10 +366,12 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
clk_enable(data->clk_sec); clk_enable(data->clk_sec);
status = readb(data->base + EXYNOS_TMU_REG_STATUS); status = readb(data->base + EXYNOS_TMU_REG_STATUS);
if (!status) if (!status) {
ret = -EBUSY; ret = -EBUSY;
else } else {
data->tmu_initialize(pdev); data->tmu_initialize(pdev);
data->tmu_clear_irqs(data);
}
clk_disable(data->clk); clk_disable(data->clk);
mutex_unlock(&data->lock); mutex_unlock(&data->lock);
...@@ -430,8 +432,6 @@ static void exynos4210_tmu_initialize(struct platform_device *pdev) ...@@ -430,8 +432,6 @@ static void exynos4210_tmu_initialize(struct platform_device *pdev)
writeb(temp - reference, data->base + writeb(temp - reference, data->base +
EXYNOS4210_TMU_REG_TRIG_LEVEL0 + i * 4); EXYNOS4210_TMU_REG_TRIG_LEVEL0 + i * 4);
} }
data->tmu_clear_irqs(data);
} }
static void exynos4412_tmu_initialize(struct platform_device *pdev) static void exynos4412_tmu_initialize(struct platform_device *pdev)
...@@ -486,8 +486,6 @@ static void exynos4412_tmu_initialize(struct platform_device *pdev) ...@@ -486,8 +486,6 @@ static void exynos4412_tmu_initialize(struct platform_device *pdev)
con = readl(data->base + EXYNOS_TMU_REG_CONTROL); con = readl(data->base + EXYNOS_TMU_REG_CONTROL);
con |= (1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT); con |= (1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT);
writel(con, data->base + EXYNOS_TMU_REG_CONTROL); writel(con, data->base + EXYNOS_TMU_REG_CONTROL);
data->tmu_clear_irqs(data);
} }
static void exynos5433_tmu_initialize(struct platform_device *pdev) static void exynos5433_tmu_initialize(struct platform_device *pdev)
...@@ -571,8 +569,6 @@ static void exynos5433_tmu_initialize(struct platform_device *pdev) ...@@ -571,8 +569,6 @@ static void exynos5433_tmu_initialize(struct platform_device *pdev)
falling_threshold |= (threshold_code << j * 8); falling_threshold |= (threshold_code << j * 8);
writel(falling_threshold, data->base + falling_reg_offset); writel(falling_threshold, data->base + falling_reg_offset);
} }
data->tmu_clear_irqs(data);
} }
static void exynos7_tmu_initialize(struct platform_device *pdev) static void exynos7_tmu_initialize(struct platform_device *pdev)
...@@ -635,8 +631,6 @@ static void exynos7_tmu_initialize(struct platform_device *pdev) ...@@ -635,8 +631,6 @@ static void exynos7_tmu_initialize(struct platform_device *pdev)
writel(falling_threshold, writel(falling_threshold,
data->base + EXYNOS7_THD_TEMP_FALL7_6 + reg_off); data->base + EXYNOS7_THD_TEMP_FALL7_6 + reg_off);
} }
data->tmu_clear_irqs(data);
} }
static void exynos4210_tmu_control(struct platform_device *pdev, bool on) static void exynos4210_tmu_control(struct platform_device *pdev, bool on)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment