diff options
| -rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 1664d37ce84d..46438b864002 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
| @@ -366,10 +366,12 @@ static int exynos_tmu_initialize(struct platform_device *pdev) | |||
| 366 | clk_enable(data->clk_sec); | 366 | clk_enable(data->clk_sec); |
| 367 | 367 | ||
| 368 | status = readb(data->base + EXYNOS_TMU_REG_STATUS); | 368 | status = readb(data->base + EXYNOS_TMU_REG_STATUS); |
| 369 | if (!status) | 369 | if (!status) { |
| 370 | ret = -EBUSY; | 370 | ret = -EBUSY; |
| 371 | else | 371 | } else { |
| 372 | data->tmu_initialize(pdev); | 372 | data->tmu_initialize(pdev); |
| 373 | data->tmu_clear_irqs(data); | ||
| 374 | } | ||
| 373 | 375 | ||
| 374 | clk_disable(data->clk); | 376 | clk_disable(data->clk); |
| 375 | mutex_unlock(&data->lock); | 377 | mutex_unlock(&data->lock); |
| @@ -430,8 +432,6 @@ static void exynos4210_tmu_initialize(struct platform_device *pdev) | |||
| 430 | writeb(temp - reference, data->base + | 432 | writeb(temp - reference, data->base + |
| 431 | EXYNOS4210_TMU_REG_TRIG_LEVEL0 + i * 4); | 433 | EXYNOS4210_TMU_REG_TRIG_LEVEL0 + i * 4); |
| 432 | } | 434 | } |
| 433 | |||
| 434 | data->tmu_clear_irqs(data); | ||
| 435 | } | 435 | } |
| 436 | 436 | ||
| 437 | static void exynos4412_tmu_initialize(struct platform_device *pdev) | 437 | static void exynos4412_tmu_initialize(struct platform_device *pdev) |
| @@ -486,8 +486,6 @@ static void exynos4412_tmu_initialize(struct platform_device *pdev) | |||
| 486 | con = readl(data->base + EXYNOS_TMU_REG_CONTROL); | 486 | con = readl(data->base + EXYNOS_TMU_REG_CONTROL); |
| 487 | con |= (1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT); | 487 | con |= (1 << EXYNOS_TMU_THERM_TRIP_EN_SHIFT); |
| 488 | writel(con, data->base + EXYNOS_TMU_REG_CONTROL); | 488 | writel(con, data->base + EXYNOS_TMU_REG_CONTROL); |
| 489 | |||
| 490 | data->tmu_clear_irqs(data); | ||
| 491 | } | 489 | } |
| 492 | 490 | ||
| 493 | static void exynos5433_tmu_initialize(struct platform_device *pdev) | 491 | static void exynos5433_tmu_initialize(struct platform_device *pdev) |
| @@ -571,8 +569,6 @@ static void exynos5433_tmu_initialize(struct platform_device *pdev) | |||
| 571 | falling_threshold |= (threshold_code << j * 8); | 569 | falling_threshold |= (threshold_code << j * 8); |
| 572 | writel(falling_threshold, data->base + falling_reg_offset); | 570 | writel(falling_threshold, data->base + falling_reg_offset); |
| 573 | } | 571 | } |
| 574 | |||
| 575 | data->tmu_clear_irqs(data); | ||
| 576 | } | 572 | } |
| 577 | 573 | ||
| 578 | static void exynos7_tmu_initialize(struct platform_device *pdev) | 574 | static void exynos7_tmu_initialize(struct platform_device *pdev) |
| @@ -635,8 +631,6 @@ static void exynos7_tmu_initialize(struct platform_device *pdev) | |||
| 635 | writel(falling_threshold, | 631 | writel(falling_threshold, |
| 636 | data->base + EXYNOS7_THD_TEMP_FALL7_6 + reg_off); | 632 | data->base + EXYNOS7_THD_TEMP_FALL7_6 + reg_off); |
| 637 | } | 633 | } |
| 638 | |||
| 639 | data->tmu_clear_irqs(data); | ||
| 640 | } | 634 | } |
| 641 | 635 | ||
| 642 | static void exynos4210_tmu_control(struct platform_device *pdev, bool on) | 636 | static void exynos4210_tmu_control(struct platform_device *pdev, bool on) |
