diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2014-11-13 10:01:28 -0500 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2014-11-20 09:54:50 -0500 |
commit | 2845f6ec81d74344a93693d9b7807ae9c3dae9ed (patch) | |
tree | c4c38bd8629692e25c87b2cf5a2b920f2cdbb77f | |
parent | 78f3320d7756c5f5ee34ea01916a91b714548962 (diff) |
thermal: exynos: remove exynos_tmu_data.h include
There is no longer need to share defines between exynos_tmu.c
and exynos_tmu_data.c (as they are now only used by the former
file) so move them accordingly. Then move externs for struct
exynos_tmu_init_data instances to exynos_tmu.h and remove no
longer needed exynos_tmu_data.h include.
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>
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 82 | ||||
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu.h | 8 | ||||
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu_data.c | 1 | ||||
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu_data.h | 115 |
4 files changed, 89 insertions, 117 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 6cc6b6e7f4c4..2a1c4c7a7c1b 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
@@ -33,7 +33,87 @@ | |||
33 | 33 | ||
34 | #include "exynos_thermal_common.h" | 34 | #include "exynos_thermal_common.h" |
35 | #include "exynos_tmu.h" | 35 | #include "exynos_tmu.h" |
36 | #include "exynos_tmu_data.h" | 36 | |
37 | /* Exynos generic registers */ | ||
38 | #define EXYNOS_TMU_REG_TRIMINFO 0x0 | ||
39 | #define EXYNOS_TMU_REG_CONTROL 0x20 | ||
40 | #define EXYNOS_TMU_REG_STATUS 0x28 | ||
41 | #define EXYNOS_TMU_REG_CURRENT_TEMP 0x40 | ||
42 | #define EXYNOS_TMU_REG_INTEN 0x70 | ||
43 | #define EXYNOS_TMU_REG_INTSTAT 0x74 | ||
44 | #define EXYNOS_TMU_REG_INTCLEAR 0x78 | ||
45 | |||
46 | #define EXYNOS_TMU_TEMP_MASK 0xff | ||
47 | #define EXYNOS_TMU_REF_VOLTAGE_SHIFT 24 | ||
48 | #define EXYNOS_TMU_REF_VOLTAGE_MASK 0x1f | ||
49 | #define EXYNOS_TMU_BUF_SLOPE_SEL_MASK 0xf | ||
50 | #define EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT 8 | ||
51 | #define EXYNOS_TMU_CORE_EN_SHIFT 0 | ||
52 | |||
53 | /* Exynos3250 specific registers */ | ||
54 | #define EXYNOS_TMU_TRIMINFO_CON1 0x10 | ||
55 | |||
56 | /* Exynos4210 specific registers */ | ||
57 | #define EXYNOS4210_TMU_REG_THRESHOLD_TEMP 0x44 | ||
58 | #define EXYNOS4210_TMU_REG_TRIG_LEVEL0 0x50 | ||
59 | |||
60 | /* Exynos5250, Exynos4412, Exynos3250 specific registers */ | ||
61 | #define EXYNOS_TMU_TRIMINFO_CON2 0x14 | ||
62 | #define EXYNOS_THD_TEMP_RISE 0x50 | ||
63 | #define EXYNOS_THD_TEMP_FALL 0x54 | ||
64 | #define EXYNOS_EMUL_CON 0x80 | ||
65 | |||
66 | #define EXYNOS_TRIMINFO_RELOAD_ENABLE 1 | ||
67 | #define EXYNOS_TRIMINFO_25_SHIFT 0 | ||
68 | #define EXYNOS_TRIMINFO_85_SHIFT 8 | ||
69 | #define EXYNOS_TMU_TRIP_MODE_SHIFT 13 | ||
70 | #define EXYNOS_TMU_TRIP_MODE_MASK 0x7 | ||
71 | #define EXYNOS_TMU_THERM_TRIP_EN_SHIFT 12 | ||
72 | |||
73 | #define EXYNOS_TMU_INTEN_RISE0_SHIFT 0 | ||
74 | #define EXYNOS_TMU_INTEN_RISE1_SHIFT 4 | ||
75 | #define EXYNOS_TMU_INTEN_RISE2_SHIFT 8 | ||
76 | #define EXYNOS_TMU_INTEN_RISE3_SHIFT 12 | ||
77 | #define EXYNOS_TMU_INTEN_FALL0_SHIFT 16 | ||
78 | |||
79 | #define EXYNOS_EMUL_TIME 0x57F0 | ||
80 | #define EXYNOS_EMUL_TIME_MASK 0xffff | ||
81 | #define EXYNOS_EMUL_TIME_SHIFT 16 | ||
82 | #define EXYNOS_EMUL_DATA_SHIFT 8 | ||
83 | #define EXYNOS_EMUL_DATA_MASK 0xFF | ||
84 | #define EXYNOS_EMUL_ENABLE 0x1 | ||
85 | |||
86 | /* Exynos5260 specific */ | ||
87 | #define EXYNOS5260_TMU_REG_INTEN 0xC0 | ||
88 | #define EXYNOS5260_TMU_REG_INTSTAT 0xC4 | ||
89 | #define EXYNOS5260_TMU_REG_INTCLEAR 0xC8 | ||
90 | #define EXYNOS5260_EMUL_CON 0x100 | ||
91 | |||
92 | /* Exynos4412 specific */ | ||
93 | #define EXYNOS4412_MUX_ADDR_VALUE 6 | ||
94 | #define EXYNOS4412_MUX_ADDR_SHIFT 20 | ||
95 | |||
96 | /*exynos5440 specific registers*/ | ||
97 | #define EXYNOS5440_TMU_S0_7_TRIM 0x000 | ||
98 | #define EXYNOS5440_TMU_S0_7_CTRL 0x020 | ||
99 | #define EXYNOS5440_TMU_S0_7_DEBUG 0x040 | ||
100 | #define EXYNOS5440_TMU_S0_7_TEMP 0x0f0 | ||
101 | #define EXYNOS5440_TMU_S0_7_TH0 0x110 | ||
102 | #define EXYNOS5440_TMU_S0_7_TH1 0x130 | ||
103 | #define EXYNOS5440_TMU_S0_7_TH2 0x150 | ||
104 | #define EXYNOS5440_TMU_S0_7_IRQEN 0x210 | ||
105 | #define EXYNOS5440_TMU_S0_7_IRQ 0x230 | ||
106 | /* exynos5440 common registers */ | ||
107 | #define EXYNOS5440_TMU_IRQ_STATUS 0x000 | ||
108 | #define EXYNOS5440_TMU_PMIN 0x004 | ||
109 | |||
110 | #define EXYNOS5440_TMU_INTEN_RISE0_SHIFT 0 | ||
111 | #define EXYNOS5440_TMU_INTEN_RISE1_SHIFT 1 | ||
112 | #define EXYNOS5440_TMU_INTEN_RISE2_SHIFT 2 | ||
113 | #define EXYNOS5440_TMU_INTEN_RISE3_SHIFT 3 | ||
114 | #define EXYNOS5440_TMU_INTEN_FALL0_SHIFT 4 | ||
115 | #define EXYNOS5440_TMU_TH_RISE4_SHIFT 24 | ||
116 | #define EXYNOS5440_EFUSE_SWAP_OFFSET 8 | ||
37 | 117 | ||
38 | /** | 118 | /** |
39 | * struct exynos_tmu_data : A structure to hold the private data of the TMU | 119 | * struct exynos_tmu_data : A structure to hold the private data of the TMU |
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 8de0f8254947..da3009bff6c4 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h | |||
@@ -133,4 +133,12 @@ struct exynos_tmu_init_data { | |||
133 | struct exynos_tmu_platform_data tmu_data[]; | 133 | struct exynos_tmu_platform_data tmu_data[]; |
134 | }; | 134 | }; |
135 | 135 | ||
136 | extern struct exynos_tmu_init_data const exynos3250_default_tmu_data; | ||
137 | extern struct exynos_tmu_init_data const exynos4210_default_tmu_data; | ||
138 | extern struct exynos_tmu_init_data const exynos4412_default_tmu_data; | ||
139 | extern struct exynos_tmu_init_data const exynos5250_default_tmu_data; | ||
140 | extern struct exynos_tmu_init_data const exynos5260_default_tmu_data; | ||
141 | extern struct exynos_tmu_init_data const exynos5420_default_tmu_data; | ||
142 | extern struct exynos_tmu_init_data const exynos5440_default_tmu_data; | ||
143 | |||
136 | #endif /* _EXYNOS_TMU_H */ | 144 | #endif /* _EXYNOS_TMU_H */ |
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index 592c470c1c4f..b23910069f68 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include "exynos_thermal_common.h" | 23 | #include "exynos_thermal_common.h" |
24 | #include "exynos_tmu.h" | 24 | #include "exynos_tmu.h" |
25 | #include "exynos_tmu_data.h" | ||
26 | 25 | ||
27 | struct exynos_tmu_init_data const exynos4210_default_tmu_data = { | 26 | struct exynos_tmu_init_data const exynos4210_default_tmu_data = { |
28 | .tmu_data = { | 27 | .tmu_data = { |
diff --git a/drivers/thermal/samsung/exynos_tmu_data.h b/drivers/thermal/samsung/exynos_tmu_data.h deleted file mode 100644 index 0bfbbf234d57..000000000000 --- a/drivers/thermal/samsung/exynos_tmu_data.h +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * exynos_tmu_data.h - Samsung EXYNOS tmu data header file | ||
3 | * | ||
4 | * Copyright (C) 2013 Samsung Electronics | ||
5 | * Amit Daniel Kachhap <amit.daniel@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef _EXYNOS_TMU_DATA_H | ||
24 | #define _EXYNOS_TMU_DATA_H | ||
25 | |||
26 | /* Exynos generic registers */ | ||
27 | #define EXYNOS_TMU_REG_TRIMINFO 0x0 | ||
28 | #define EXYNOS_TMU_REG_CONTROL 0x20 | ||
29 | #define EXYNOS_TMU_REG_STATUS 0x28 | ||
30 | #define EXYNOS_TMU_REG_CURRENT_TEMP 0x40 | ||
31 | #define EXYNOS_TMU_REG_INTEN 0x70 | ||
32 | #define EXYNOS_TMU_REG_INTSTAT 0x74 | ||
33 | #define EXYNOS_TMU_REG_INTCLEAR 0x78 | ||
34 | |||
35 | #define EXYNOS_TMU_TEMP_MASK 0xff | ||
36 | #define EXYNOS_TMU_REF_VOLTAGE_SHIFT 24 | ||
37 | #define EXYNOS_TMU_REF_VOLTAGE_MASK 0x1f | ||
38 | #define EXYNOS_TMU_BUF_SLOPE_SEL_MASK 0xf | ||
39 | #define EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT 8 | ||
40 | #define EXYNOS_TMU_CORE_EN_SHIFT 0 | ||
41 | |||
42 | /* Exynos3250 specific registers */ | ||
43 | #define EXYNOS_TMU_TRIMINFO_CON1 0x10 | ||
44 | |||
45 | /* Exynos4210 specific registers */ | ||
46 | #define EXYNOS4210_TMU_REG_THRESHOLD_TEMP 0x44 | ||
47 | #define EXYNOS4210_TMU_REG_TRIG_LEVEL0 0x50 | ||
48 | |||
49 | /* Exynos5250, Exynos4412, Exynos3250 specific registers */ | ||
50 | #define EXYNOS_TMU_TRIMINFO_CON2 0x14 | ||
51 | #define EXYNOS_THD_TEMP_RISE 0x50 | ||
52 | #define EXYNOS_THD_TEMP_FALL 0x54 | ||
53 | #define EXYNOS_EMUL_CON 0x80 | ||
54 | |||
55 | #define EXYNOS_TRIMINFO_RELOAD_ENABLE 1 | ||
56 | #define EXYNOS_TRIMINFO_25_SHIFT 0 | ||
57 | #define EXYNOS_TRIMINFO_85_SHIFT 8 | ||
58 | #define EXYNOS_TMU_TRIP_MODE_SHIFT 13 | ||
59 | #define EXYNOS_TMU_TRIP_MODE_MASK 0x7 | ||
60 | #define EXYNOS_TMU_THERM_TRIP_EN_SHIFT 12 | ||
61 | |||
62 | #define EXYNOS_TMU_INTEN_RISE0_SHIFT 0 | ||
63 | #define EXYNOS_TMU_INTEN_RISE1_SHIFT 4 | ||
64 | #define EXYNOS_TMU_INTEN_RISE2_SHIFT 8 | ||
65 | #define EXYNOS_TMU_INTEN_RISE3_SHIFT 12 | ||
66 | #define EXYNOS_TMU_INTEN_FALL0_SHIFT 16 | ||
67 | |||
68 | #define EXYNOS_EMUL_TIME 0x57F0 | ||
69 | #define EXYNOS_EMUL_TIME_MASK 0xffff | ||
70 | #define EXYNOS_EMUL_TIME_SHIFT 16 | ||
71 | #define EXYNOS_EMUL_DATA_SHIFT 8 | ||
72 | #define EXYNOS_EMUL_DATA_MASK 0xFF | ||
73 | #define EXYNOS_EMUL_ENABLE 0x1 | ||
74 | |||
75 | /* Exynos5260 specific */ | ||
76 | #define EXYNOS5260_TMU_REG_INTEN 0xC0 | ||
77 | #define EXYNOS5260_TMU_REG_INTSTAT 0xC4 | ||
78 | #define EXYNOS5260_TMU_REG_INTCLEAR 0xC8 | ||
79 | #define EXYNOS5260_EMUL_CON 0x100 | ||
80 | |||
81 | /* Exynos4412 specific */ | ||
82 | #define EXYNOS4412_MUX_ADDR_VALUE 6 | ||
83 | #define EXYNOS4412_MUX_ADDR_SHIFT 20 | ||
84 | |||
85 | /*exynos5440 specific registers*/ | ||
86 | #define EXYNOS5440_TMU_S0_7_TRIM 0x000 | ||
87 | #define EXYNOS5440_TMU_S0_7_CTRL 0x020 | ||
88 | #define EXYNOS5440_TMU_S0_7_DEBUG 0x040 | ||
89 | #define EXYNOS5440_TMU_S0_7_TEMP 0x0f0 | ||
90 | #define EXYNOS5440_TMU_S0_7_TH0 0x110 | ||
91 | #define EXYNOS5440_TMU_S0_7_TH1 0x130 | ||
92 | #define EXYNOS5440_TMU_S0_7_TH2 0x150 | ||
93 | #define EXYNOS5440_TMU_S0_7_IRQEN 0x210 | ||
94 | #define EXYNOS5440_TMU_S0_7_IRQ 0x230 | ||
95 | /* exynos5440 common registers */ | ||
96 | #define EXYNOS5440_TMU_IRQ_STATUS 0x000 | ||
97 | #define EXYNOS5440_TMU_PMIN 0x004 | ||
98 | |||
99 | #define EXYNOS5440_TMU_INTEN_RISE0_SHIFT 0 | ||
100 | #define EXYNOS5440_TMU_INTEN_RISE1_SHIFT 1 | ||
101 | #define EXYNOS5440_TMU_INTEN_RISE2_SHIFT 2 | ||
102 | #define EXYNOS5440_TMU_INTEN_RISE3_SHIFT 3 | ||
103 | #define EXYNOS5440_TMU_INTEN_FALL0_SHIFT 4 | ||
104 | #define EXYNOS5440_TMU_TH_RISE4_SHIFT 24 | ||
105 | #define EXYNOS5440_EFUSE_SWAP_OFFSET 8 | ||
106 | |||
107 | extern struct exynos_tmu_init_data const exynos3250_default_tmu_data; | ||
108 | extern struct exynos_tmu_init_data const exynos4210_default_tmu_data; | ||
109 | extern struct exynos_tmu_init_data const exynos4412_default_tmu_data; | ||
110 | extern struct exynos_tmu_init_data const exynos5250_default_tmu_data; | ||
111 | extern struct exynos_tmu_init_data const exynos5260_default_tmu_data; | ||
112 | extern struct exynos_tmu_init_data const exynos5420_default_tmu_data; | ||
113 | extern struct exynos_tmu_init_data const exynos5440_default_tmu_data; | ||
114 | |||
115 | #endif /*_EXYNOS_TMU_DATA_H*/ | ||