diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-exynos/clock-exynos5.c | 46 | ||||
-rw-r--r-- | arch/arm/mach-exynos/include/mach/regs-clock.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/s5p-clock.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-samsung/s5p-clock.c | 30 |
4 files changed, 80 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index 84ef35aceba2..5aa460b01fdf 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c | |||
@@ -165,11 +165,29 @@ static struct clksrc_clk exynos5_clk_sclk_apll = { | |||
165 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 24, .size = 3 }, | 165 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 24, .size = 3 }, |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static struct clksrc_clk exynos5_clk_mout_bpll_fout = { | ||
169 | .clk = { | ||
170 | .name = "mout_bpll_fout", | ||
171 | }, | ||
172 | .sources = &clk_src_bpll_fout, | ||
173 | .reg_src = { .reg = EXYNOS5_PLL_DIV2_SEL, .shift = 0, .size = 1 }, | ||
174 | }; | ||
175 | |||
176 | static struct clk *exynos5_clk_src_bpll_list[] = { | ||
177 | [0] = &clk_fin_bpll, | ||
178 | [1] = &exynos5_clk_mout_bpll_fout.clk, | ||
179 | }; | ||
180 | |||
181 | static struct clksrc_sources exynos5_clk_src_bpll = { | ||
182 | .sources = exynos5_clk_src_bpll_list, | ||
183 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_bpll_list), | ||
184 | }; | ||
185 | |||
168 | static struct clksrc_clk exynos5_clk_mout_bpll = { | 186 | static struct clksrc_clk exynos5_clk_mout_bpll = { |
169 | .clk = { | 187 | .clk = { |
170 | .name = "mout_bpll", | 188 | .name = "mout_bpll", |
171 | }, | 189 | }, |
172 | .sources = &clk_src_bpll, | 190 | .sources = &exynos5_clk_src_bpll, |
173 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 0, .size = 1 }, | 191 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 0, .size = 1 }, |
174 | }; | 192 | }; |
175 | 193 | ||
@@ -207,11 +225,29 @@ static struct clksrc_clk exynos5_clk_mout_epll = { | |||
207 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 12, .size = 1 }, | 225 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 12, .size = 1 }, |
208 | }; | 226 | }; |
209 | 227 | ||
228 | static struct clksrc_clk exynos5_clk_mout_mpll_fout = { | ||
229 | .clk = { | ||
230 | .name = "mout_mpll_fout", | ||
231 | }, | ||
232 | .sources = &clk_src_mpll_fout, | ||
233 | .reg_src = { .reg = EXYNOS5_PLL_DIV2_SEL, .shift = 4, .size = 1 }, | ||
234 | }; | ||
235 | |||
236 | static struct clk *exynos5_clk_src_mpll_list[] = { | ||
237 | [0] = &clk_fin_mpll, | ||
238 | [1] = &exynos5_clk_mout_mpll_fout.clk, | ||
239 | }; | ||
240 | |||
241 | static struct clksrc_sources exynos5_clk_src_mpll = { | ||
242 | .sources = exynos5_clk_src_mpll_list, | ||
243 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_list), | ||
244 | }; | ||
245 | |||
210 | struct clksrc_clk exynos5_clk_mout_mpll = { | 246 | struct clksrc_clk exynos5_clk_mout_mpll = { |
211 | .clk = { | 247 | .clk = { |
212 | .name = "mout_mpll", | 248 | .name = "mout_mpll", |
213 | }, | 249 | }, |
214 | .sources = &clk_src_mpll, | 250 | .sources = &exynos5_clk_src_mpll, |
215 | .reg_src = { .reg = EXYNOS5_CLKSRC_CORE1, .shift = 8, .size = 1 }, | 251 | .reg_src = { .reg = EXYNOS5_CLKSRC_CORE1, .shift = 8, .size = 1 }, |
216 | }; | 252 | }; |
217 | 253 | ||
@@ -1036,10 +1072,12 @@ static struct clksrc_clk *exynos5_sysclks[] = { | |||
1036 | &exynos5_clk_mout_apll, | 1072 | &exynos5_clk_mout_apll, |
1037 | &exynos5_clk_sclk_apll, | 1073 | &exynos5_clk_sclk_apll, |
1038 | &exynos5_clk_mout_bpll, | 1074 | &exynos5_clk_mout_bpll, |
1075 | &exynos5_clk_mout_bpll_fout, | ||
1039 | &exynos5_clk_mout_bpll_user, | 1076 | &exynos5_clk_mout_bpll_user, |
1040 | &exynos5_clk_mout_cpll, | 1077 | &exynos5_clk_mout_cpll, |
1041 | &exynos5_clk_mout_epll, | 1078 | &exynos5_clk_mout_epll, |
1042 | &exynos5_clk_mout_mpll, | 1079 | &exynos5_clk_mout_mpll, |
1080 | &exynos5_clk_mout_mpll_fout, | ||
1043 | &exynos5_clk_mout_mpll_user, | 1081 | &exynos5_clk_mout_mpll_user, |
1044 | &exynos5_clk_vpllsrc, | 1082 | &exynos5_clk_vpllsrc, |
1045 | &exynos5_clk_sclk_vpll, | 1083 | &exynos5_clk_sclk_vpll, |
@@ -1103,7 +1141,9 @@ static struct clk *exynos5_clks[] __initdata = { | |||
1103 | &exynos5_clk_sclk_hdmi27m, | 1141 | &exynos5_clk_sclk_hdmi27m, |
1104 | &exynos5_clk_sclk_hdmiphy, | 1142 | &exynos5_clk_sclk_hdmiphy, |
1105 | &clk_fout_bpll, | 1143 | &clk_fout_bpll, |
1144 | &clk_fout_bpll_div2, | ||
1106 | &clk_fout_cpll, | 1145 | &clk_fout_cpll, |
1146 | &clk_fout_mpll_div2, | ||
1107 | &exynos5_clk_armclk, | 1147 | &exynos5_clk_armclk, |
1108 | }; | 1148 | }; |
1109 | 1149 | ||
@@ -1268,8 +1308,10 @@ void __init_or_cpufreq exynos5_setup_clocks(void) | |||
1268 | 1308 | ||
1269 | clk_fout_apll.ops = &exynos5_fout_apll_ops; | 1309 | clk_fout_apll.ops = &exynos5_fout_apll_ops; |
1270 | clk_fout_bpll.rate = bpll; | 1310 | clk_fout_bpll.rate = bpll; |
1311 | clk_fout_bpll_div2.rate = bpll >> 1; | ||
1271 | clk_fout_cpll.rate = cpll; | 1312 | clk_fout_cpll.rate = cpll; |
1272 | clk_fout_mpll.rate = mpll; | 1313 | clk_fout_mpll.rate = mpll; |
1314 | clk_fout_mpll_div2.rate = mpll >> 1; | ||
1273 | clk_fout_epll.rate = epll; | 1315 | clk_fout_epll.rate = epll; |
1274 | clk_fout_vpll.rate = vpll; | 1316 | clk_fout_vpll.rate = vpll; |
1275 | 1317 | ||
diff --git a/arch/arm/mach-exynos/include/mach/regs-clock.h b/arch/arm/mach-exynos/include/mach/regs-clock.h index dba83e91f0fd..b78b5f3ad9c0 100644 --- a/arch/arm/mach-exynos/include/mach/regs-clock.h +++ b/arch/arm/mach-exynos/include/mach/regs-clock.h | |||
@@ -322,6 +322,8 @@ | |||
322 | #define EXYNOS5_CLKSRC_CDREX EXYNOS_CLKREG(0x20200) | 322 | #define EXYNOS5_CLKSRC_CDREX EXYNOS_CLKREG(0x20200) |
323 | #define EXYNOS5_CLKDIV_CDREX EXYNOS_CLKREG(0x20500) | 323 | #define EXYNOS5_CLKDIV_CDREX EXYNOS_CLKREG(0x20500) |
324 | 324 | ||
325 | #define EXYNOS5_PLL_DIV2_SEL EXYNOS_CLKREG(0x20A24) | ||
326 | |||
325 | #define EXYNOS5_EPLL_LOCK EXYNOS_CLKREG(0x10030) | 327 | #define EXYNOS5_EPLL_LOCK EXYNOS_CLKREG(0x10030) |
326 | 328 | ||
327 | #define EXYNOS5_EPLLCON0_LOCKED_SHIFT (29) | 329 | #define EXYNOS5_EPLLCON0_LOCKED_SHIFT (29) |
diff --git a/arch/arm/plat-samsung/include/plat/s5p-clock.h b/arch/arm/plat-samsung/include/plat/s5p-clock.h index 1de4b32f98e9..8364b4bea8b8 100644 --- a/arch/arm/plat-samsung/include/plat/s5p-clock.h +++ b/arch/arm/plat-samsung/include/plat/s5p-clock.h | |||
@@ -32,8 +32,10 @@ extern struct clk clk_48m; | |||
32 | extern struct clk s5p_clk_27m; | 32 | extern struct clk s5p_clk_27m; |
33 | extern struct clk clk_fout_apll; | 33 | extern struct clk clk_fout_apll; |
34 | extern struct clk clk_fout_bpll; | 34 | extern struct clk clk_fout_bpll; |
35 | extern struct clk clk_fout_bpll_div2; | ||
35 | extern struct clk clk_fout_cpll; | 36 | extern struct clk clk_fout_cpll; |
36 | extern struct clk clk_fout_mpll; | 37 | extern struct clk clk_fout_mpll; |
38 | extern struct clk clk_fout_mpll_div2; | ||
37 | extern struct clk clk_fout_epll; | 39 | extern struct clk clk_fout_epll; |
38 | extern struct clk clk_fout_dpll; | 40 | extern struct clk clk_fout_dpll; |
39 | extern struct clk clk_fout_vpll; | 41 | extern struct clk clk_fout_vpll; |
@@ -42,8 +44,10 @@ extern struct clk clk_vpll; | |||
42 | 44 | ||
43 | extern struct clksrc_sources clk_src_apll; | 45 | extern struct clksrc_sources clk_src_apll; |
44 | extern struct clksrc_sources clk_src_bpll; | 46 | extern struct clksrc_sources clk_src_bpll; |
47 | extern struct clksrc_sources clk_src_bpll_fout; | ||
45 | extern struct clksrc_sources clk_src_cpll; | 48 | extern struct clksrc_sources clk_src_cpll; |
46 | extern struct clksrc_sources clk_src_mpll; | 49 | extern struct clksrc_sources clk_src_mpll; |
50 | extern struct clksrc_sources clk_src_mpll_fout; | ||
47 | extern struct clksrc_sources clk_src_epll; | 51 | extern struct clksrc_sources clk_src_epll; |
48 | extern struct clksrc_sources clk_src_dpll; | 52 | extern struct clksrc_sources clk_src_dpll; |
49 | 53 | ||
diff --git a/arch/arm/plat-samsung/s5p-clock.c b/arch/arm/plat-samsung/s5p-clock.c index 41d3dfd5dddb..031a61899bef 100644 --- a/arch/arm/plat-samsung/s5p-clock.c +++ b/arch/arm/plat-samsung/s5p-clock.c | |||
@@ -67,6 +67,11 @@ struct clk clk_fout_bpll = { | |||
67 | .id = -1, | 67 | .id = -1, |
68 | }; | 68 | }; |
69 | 69 | ||
70 | struct clk clk_fout_bpll_div2 = { | ||
71 | .name = "fout_bpll_div2", | ||
72 | .id = -1, | ||
73 | }; | ||
74 | |||
70 | /* CPLL clock output */ | 75 | /* CPLL clock output */ |
71 | 76 | ||
72 | struct clk clk_fout_cpll = { | 77 | struct clk clk_fout_cpll = { |
@@ -82,6 +87,11 @@ struct clk clk_fout_mpll = { | |||
82 | .id = -1, | 87 | .id = -1, |
83 | }; | 88 | }; |
84 | 89 | ||
90 | struct clk clk_fout_mpll_div2 = { | ||
91 | .name = "fout_mpll_div2", | ||
92 | .id = -1, | ||
93 | }; | ||
94 | |||
85 | /* EPLL clock output */ | 95 | /* EPLL clock output */ |
86 | struct clk clk_fout_epll = { | 96 | struct clk clk_fout_epll = { |
87 | .name = "fout_epll", | 97 | .name = "fout_epll", |
@@ -125,6 +135,16 @@ struct clksrc_sources clk_src_bpll = { | |||
125 | .nr_sources = ARRAY_SIZE(clk_src_bpll_list), | 135 | .nr_sources = ARRAY_SIZE(clk_src_bpll_list), |
126 | }; | 136 | }; |
127 | 137 | ||
138 | static struct clk *clk_src_bpll_fout_list[] = { | ||
139 | [0] = &clk_fout_bpll_div2, | ||
140 | [1] = &clk_fout_bpll, | ||
141 | }; | ||
142 | |||
143 | struct clksrc_sources clk_src_bpll_fout = { | ||
144 | .sources = clk_src_bpll_fout_list, | ||
145 | .nr_sources = ARRAY_SIZE(clk_src_bpll_fout_list), | ||
146 | }; | ||
147 | |||
128 | /* Possible clock sources for CPLL Mux */ | 148 | /* Possible clock sources for CPLL Mux */ |
129 | static struct clk *clk_src_cpll_list[] = { | 149 | static struct clk *clk_src_cpll_list[] = { |
130 | [0] = &clk_fin_cpll, | 150 | [0] = &clk_fin_cpll, |
@@ -147,6 +167,16 @@ struct clksrc_sources clk_src_mpll = { | |||
147 | .nr_sources = ARRAY_SIZE(clk_src_mpll_list), | 167 | .nr_sources = ARRAY_SIZE(clk_src_mpll_list), |
148 | }; | 168 | }; |
149 | 169 | ||
170 | static struct clk *clk_src_mpll_fout_list[] = { | ||
171 | [0] = &clk_fout_mpll_div2, | ||
172 | [1] = &clk_fout_mpll, | ||
173 | }; | ||
174 | |||
175 | struct clksrc_sources clk_src_mpll_fout = { | ||
176 | .sources = clk_src_mpll_fout_list, | ||
177 | .nr_sources = ARRAY_SIZE(clk_src_mpll_fout_list), | ||
178 | }; | ||
179 | |||
150 | /* Possible clock sources for EPLL Mux */ | 180 | /* Possible clock sources for EPLL Mux */ |
151 | static struct clk *clk_src_epll_list[] = { | 181 | static struct clk *clk_src_epll_list[] = { |
152 | [0] = &clk_fin_epll, | 182 | [0] = &clk_fin_epll, |