diff options
| -rw-r--r-- | Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 4 | ||||
| -rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 14 | ||||
| -rw-r--r-- | drivers/thermal/samsung/exynos_tmu.h | 4 | ||||
| -rw-r--r-- | drivers/thermal/samsung/exynos_tmu_data.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt index 284f5300fd8b..a1aa6023d248 100644 --- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | - reg : Address range of the thermal registers. For soc's which has multiple | 11 | - reg : Address range of the thermal registers. For soc's which has multiple |
| 12 | instances of TMU and some registers are shared across all TMU's like | 12 | instances of TMU and some registers are shared across all TMU's like |
| 13 | interrupt related then 2 set of register has to supplied. First set | 13 | interrupt related then 2 set of register has to supplied. First set |
| 14 | belongs to each instance of TMU and second set belongs to common TMU | 14 | belongs to register set of TMU instance and second set belongs to |
| 15 | registers. | 15 | registers shared with the TMU instance. |
| 16 | - interrupts : Should contain interrupt for thermal system | 16 | - interrupts : Should contain interrupt for thermal system |
| 17 | - clocks : The main clock for TMU device | 17 | - clocks : The main clock for TMU device |
| 18 | - clock-names : Thermal system clock name | 18 | - clock-names : Thermal system clock name |
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index c308a3d9c0ea..d9e7663fea8c 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | * @id: identifier of the one instance of the TMU controller. | 41 | * @id: identifier of the one instance of the TMU controller. |
| 42 | * @pdata: pointer to the tmu platform/configuration data | 42 | * @pdata: pointer to the tmu platform/configuration data |
| 43 | * @base: base address of the single instance of the TMU controller. | 43 | * @base: base address of the single instance of the TMU controller. |
| 44 | * @base_common: base address of the common registers of the TMU controller. | 44 | * @base_second: base address of the common registers of the TMU controller. |
| 45 | * @irq: irq number of the TMU controller. | 45 | * @irq: irq number of the TMU controller. |
| 46 | * @soc: id of the SOC type. | 46 | * @soc: id of the SOC type. |
| 47 | * @irq_work: pointer to the irq work structure. | 47 | * @irq_work: pointer to the irq work structure. |
| @@ -56,7 +56,7 @@ struct exynos_tmu_data { | |||
| 56 | int id; | 56 | int id; |
| 57 | struct exynos_tmu_platform_data *pdata; | 57 | struct exynos_tmu_platform_data *pdata; |
| 58 | void __iomem *base; | 58 | void __iomem *base; |
| 59 | void __iomem *base_common; | 59 | void __iomem *base_second; |
| 60 | int irq; | 60 | int irq; |
| 61 | enum soc_type soc; | 61 | enum soc_type soc; |
| 62 | struct work_struct irq_work; | 62 | struct work_struct irq_work; |
| @@ -298,7 +298,7 @@ skip_calib_data: | |||
| 298 | } | 298 | } |
| 299 | /*Clear the PMIN in the common TMU register*/ | 299 | /*Clear the PMIN in the common TMU register*/ |
| 300 | if (reg->tmu_pmin && !data->id) | 300 | if (reg->tmu_pmin && !data->id) |
| 301 | writel(0, data->base_common + reg->tmu_pmin); | 301 | writel(0, data->base_second + reg->tmu_pmin); |
| 302 | out: | 302 | out: |
| 303 | clk_disable(data->clk); | 303 | clk_disable(data->clk); |
| 304 | mutex_unlock(&data->lock); | 304 | mutex_unlock(&data->lock); |
| @@ -455,7 +455,7 @@ static void exynos_tmu_work(struct work_struct *work) | |||
| 455 | 455 | ||
| 456 | /* Find which sensor generated this interrupt */ | 456 | /* Find which sensor generated this interrupt */ |
| 457 | if (reg->tmu_irqstatus) { | 457 | if (reg->tmu_irqstatus) { |
| 458 | val_type = readl(data->base_common + reg->tmu_irqstatus); | 458 | val_type = readl(data->base_second + reg->tmu_irqstatus); |
| 459 | if (!((val_type >> data->id) & 0x1)) | 459 | if (!((val_type >> data->id) & 0x1)) |
| 460 | goto out; | 460 | goto out; |
| 461 | } | 461 | } |
| @@ -580,7 +580,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) | |||
| 580 | * Check if the TMU shares some registers and then try to map the | 580 | * Check if the TMU shares some registers and then try to map the |
| 581 | * memory of common registers. | 581 | * memory of common registers. |
| 582 | */ | 582 | */ |
| 583 | if (!TMU_SUPPORTS(pdata, SHARED_MEMORY)) | 583 | if (!TMU_SUPPORTS(pdata, ADDRESS_MULTIPLE)) |
| 584 | return 0; | 584 | return 0; |
| 585 | 585 | ||
| 586 | if (of_address_to_resource(pdev->dev.of_node, 1, &res)) { | 586 | if (of_address_to_resource(pdev->dev.of_node, 1, &res)) { |
| @@ -588,9 +588,9 @@ static int exynos_map_dt_data(struct platform_device *pdev) | |||
| 588 | return -ENODEV; | 588 | return -ENODEV; |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | data->base_common = devm_ioremap(&pdev->dev, res.start, | 591 | data->base_second = devm_ioremap(&pdev->dev, res.start, |
| 592 | resource_size(&res)); | 592 | resource_size(&res)); |
| 593 | if (!data->base_common) { | 593 | if (!data->base_second) { |
| 594 | dev_err(&pdev->dev, "Failed to ioremap memory\n"); | 594 | dev_err(&pdev->dev, "Failed to ioremap memory\n"); |
| 595 | return -ENOMEM; | 595 | return -ENOMEM; |
| 596 | } | 596 | } |
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 980859a6ad1c..0d6b32fb0a4c 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h | |||
| @@ -60,7 +60,7 @@ enum soc_type { | |||
| 60 | * state(active/idle) can be checked. | 60 | * state(active/idle) can be checked. |
| 61 | * TMU_SUPPORT_EMUL_TIME - This features allows to set next temp emulation | 61 | * TMU_SUPPORT_EMUL_TIME - This features allows to set next temp emulation |
| 62 | * sample time. | 62 | * sample time. |
| 63 | * TMU_SUPPORT_SHARED_MEMORY - This feature tells that the different TMU | 63 | * TMU_SUPPORT_ADDRESS_MULTIPLE - This feature tells that the different TMU |
| 64 | * sensors shares some common registers. | 64 | * sensors shares some common registers. |
| 65 | * TMU_SUPPORT - macro to compare the above features with the supplied. | 65 | * TMU_SUPPORT - macro to compare the above features with the supplied. |
| 66 | */ | 66 | */ |
| @@ -70,7 +70,7 @@ enum soc_type { | |||
| 70 | #define TMU_SUPPORT_FALLING_TRIP BIT(3) | 70 | #define TMU_SUPPORT_FALLING_TRIP BIT(3) |
| 71 | #define TMU_SUPPORT_READY_STATUS BIT(4) | 71 | #define TMU_SUPPORT_READY_STATUS BIT(4) |
| 72 | #define TMU_SUPPORT_EMUL_TIME BIT(5) | 72 | #define TMU_SUPPORT_EMUL_TIME BIT(5) |
| 73 | #define TMU_SUPPORT_SHARED_MEMORY BIT(6) | 73 | #define TMU_SUPPORT_ADDRESS_MULTIPLE BIT(6) |
| 74 | 74 | ||
| 75 | #define TMU_SUPPORTS(a, b) (a->features & TMU_SUPPORT_ ## b) | 75 | #define TMU_SUPPORTS(a, b) (a->features & TMU_SUPPORT_ ## b) |
| 76 | 76 | ||
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index 7d58219b8604..9816294f7058 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c | |||
| @@ -255,7 +255,7 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = { | |||
| 255 | .type = SOC_ARCH_EXYNOS5440, \ | 255 | .type = SOC_ARCH_EXYNOS5440, \ |
| 256 | .registers = &exynos5440_tmu_registers, \ | 256 | .registers = &exynos5440_tmu_registers, \ |
| 257 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_FALLING_TRIP | \ | 257 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_FALLING_TRIP | \ |
| 258 | TMU_SUPPORT_MULTI_INST | TMU_SUPPORT_SHARED_MEMORY), | 258 | TMU_SUPPORT_MULTI_INST | TMU_SUPPORT_ADDRESS_MULTIPLE), |
| 259 | 259 | ||
| 260 | struct exynos_tmu_init_data const exynos5440_default_tmu_data = { | 260 | struct exynos_tmu_init_data const exynos5440_default_tmu_data = { |
| 261 | .tmu_data = { | 261 | .tmu_data = { |
