diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 02:22:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 02:22:52 -0500 |
commit | 56c8bc3b7ed3d24c665e2ce992f86a5bedffc852 (patch) | |
tree | ee8747e83beb5a4323dd2328f3368ffb9031dc31 /arch/arm | |
parent | b8bf17d311c875de02550d5ce2af66588734159a (diff) | |
parent | 1c1744cc7cee83b96e3a89c1b9853fc033bafb9c (diff) |
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
SuperH updates for 3.3 merge window.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (38 commits)
sh: magicpanelr2: Update for parse_mtd_partitions() fallout.
sh: mach-rsk: Update for parse_mtd_partitions() fallout.
sh: sh2a: Improve cache flush/invalidate functions
sh: also without PM_RUNTIME pm_runtime.o must be built
sh: add a resource name for shdma
sh: Remove redundant try_to_freeze() invocations.
sh: Ensure IRQs are enabled across do_notify_resume().
sh: Fix up store queue code for subsys_interface changes.
sh: clkfwk: sh_clk_init_parent() should be called after clk_register()
sh: add platform_device for renesas_usbhs in board-sh7757lcr
sh: modify clock-sh7757 for renesas_usbhs
sh: pfc: ioremap() support
sh: use ioread32/iowrite32 and mapped_reg for div6
sh: use ioread32/iowrite32 and mapped_reg for div4
sh: use ioread32/iowrite32 and mapped_reg for mstp32
sh: extend clock struct with mapped_reg member
sh: clkfwk: clock-sh73a0: all div6_clks use SH_CLK_DIV6_EXT()
sh: clkfwk: clock-sh7724: all div6_clks use SH_CLK_DIV6_EXT()
sh: clock-sh7723: add CLKDEV_ICK_ID for cleanup
serial: sh-sci: Handle GPIO function requests.
...
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7372.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh73a0.c | 140 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 2 |
3 files changed, 123 insertions, 25 deletions
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 995a9c3aec8f..e349c22a0d71 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -411,11 +411,11 @@ static struct clk *fsibckcr_parent[] = { | |||
411 | }; | 411 | }; |
412 | 412 | ||
413 | static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { | 413 | static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { |
414 | [DIV6_HDMI] = SH_CLK_DIV6_EXT(&pllc1_div2_clk, HDMICKCR, 0, | 414 | [DIV6_HDMI] = SH_CLK_DIV6_EXT(HDMICKCR, 0, |
415 | hdmi_parent, ARRAY_SIZE(hdmi_parent), 6, 2), | 415 | hdmi_parent, ARRAY_SIZE(hdmi_parent), 6, 2), |
416 | [DIV6_FSIA] = SH_CLK_DIV6_EXT(&pllc1_div2_clk, FSIACKCR, 0, | 416 | [DIV6_FSIA] = SH_CLK_DIV6_EXT(FSIACKCR, 0, |
417 | fsiackcr_parent, ARRAY_SIZE(fsiackcr_parent), 6, 2), | 417 | fsiackcr_parent, ARRAY_SIZE(fsiackcr_parent), 6, 2), |
418 | [DIV6_FSIB] = SH_CLK_DIV6_EXT(&pllc1_div2_clk, FSIBCKCR, 0, | 418 | [DIV6_FSIB] = SH_CLK_DIV6_EXT(FSIBCKCR, 0, |
419 | fsibckcr_parent, ARRAY_SIZE(fsibckcr_parent), 6, 2), | 419 | fsibckcr_parent, ARRAY_SIZE(fsibckcr_parent), 6, 2), |
420 | }; | 420 | }; |
421 | 421 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 1370a89ca358..34944d01bf1e 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -92,6 +92,24 @@ static struct clk_ops div2_clk_ops = { | |||
92 | .recalc = div2_recalc, | 92 | .recalc = div2_recalc, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static unsigned long div7_recalc(struct clk *clk) | ||
96 | { | ||
97 | return clk->parent->rate / 7; | ||
98 | } | ||
99 | |||
100 | static struct clk_ops div7_clk_ops = { | ||
101 | .recalc = div7_recalc, | ||
102 | }; | ||
103 | |||
104 | static unsigned long div13_recalc(struct clk *clk) | ||
105 | { | ||
106 | return clk->parent->rate / 13; | ||
107 | } | ||
108 | |||
109 | static struct clk_ops div13_clk_ops = { | ||
110 | .recalc = div13_recalc, | ||
111 | }; | ||
112 | |||
95 | /* Divide extal1 by two */ | 113 | /* Divide extal1 by two */ |
96 | static struct clk extal1_div2_clk = { | 114 | static struct clk extal1_div2_clk = { |
97 | .ops = &div2_clk_ops, | 115 | .ops = &div2_clk_ops, |
@@ -174,12 +192,29 @@ static struct clk pll3_clk = { | |||
174 | .enable_bit = 3, | 192 | .enable_bit = 3, |
175 | }; | 193 | }; |
176 | 194 | ||
177 | /* Divide PLL1 by two */ | 195 | /* Divide PLL */ |
178 | static struct clk pll1_div2_clk = { | 196 | static struct clk pll1_div2_clk = { |
179 | .ops = &div2_clk_ops, | 197 | .ops = &div2_clk_ops, |
180 | .parent = &pll1_clk, | 198 | .parent = &pll1_clk, |
181 | }; | 199 | }; |
182 | 200 | ||
201 | static struct clk pll1_div7_clk = { | ||
202 | .ops = &div7_clk_ops, | ||
203 | .parent = &pll1_clk, | ||
204 | }; | ||
205 | |||
206 | static struct clk pll1_div13_clk = { | ||
207 | .ops = &div13_clk_ops, | ||
208 | .parent = &pll1_clk, | ||
209 | }; | ||
210 | |||
211 | /* External input clock */ | ||
212 | struct clk sh73a0_extcki_clk = { | ||
213 | }; | ||
214 | |||
215 | struct clk sh73a0_extalr_clk = { | ||
216 | }; | ||
217 | |||
183 | static struct clk *main_clks[] = { | 218 | static struct clk *main_clks[] = { |
184 | &r_clk, | 219 | &r_clk, |
185 | &sh73a0_extal1_clk, | 220 | &sh73a0_extal1_clk, |
@@ -193,6 +228,10 @@ static struct clk *main_clks[] = { | |||
193 | &pll2_clk, | 228 | &pll2_clk, |
194 | &pll3_clk, | 229 | &pll3_clk, |
195 | &pll1_div2_clk, | 230 | &pll1_div2_clk, |
231 | &pll1_div7_clk, | ||
232 | &pll1_div13_clk, | ||
233 | &sh73a0_extcki_clk, | ||
234 | &sh73a0_extalr_clk, | ||
196 | }; | 235 | }; |
197 | 236 | ||
198 | static void div4_kick(struct clk *clk) | 237 | static void div4_kick(struct clk *clk) |
@@ -246,27 +285,84 @@ enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_ZB1, | |||
246 | DIV6_DSIT, DIV6_DSI0P, DIV6_DSI1P, | 285 | DIV6_DSIT, DIV6_DSI0P, DIV6_DSI1P, |
247 | DIV6_NR }; | 286 | DIV6_NR }; |
248 | 287 | ||
288 | static struct clk *vck_parent[8] = { | ||
289 | [0] = &pll1_div2_clk, | ||
290 | [1] = &pll2_clk, | ||
291 | [2] = &sh73a0_extcki_clk, | ||
292 | [3] = &sh73a0_extal2_clk, | ||
293 | [4] = &main_div2_clk, | ||
294 | [5] = &sh73a0_extalr_clk, | ||
295 | [6] = &main_clk, | ||
296 | }; | ||
297 | |||
298 | static struct clk *pll_parent[4] = { | ||
299 | [0] = &pll1_div2_clk, | ||
300 | [1] = &pll2_clk, | ||
301 | [2] = &pll1_div13_clk, | ||
302 | }; | ||
303 | |||
304 | static struct clk *hsi_parent[4] = { | ||
305 | [0] = &pll1_div2_clk, | ||
306 | [1] = &pll2_clk, | ||
307 | [2] = &pll1_div7_clk, | ||
308 | }; | ||
309 | |||
310 | static struct clk *pll_extal2_parent[] = { | ||
311 | [0] = &pll1_div2_clk, | ||
312 | [1] = &pll2_clk, | ||
313 | [2] = &sh73a0_extal2_clk, | ||
314 | [3] = &sh73a0_extal2_clk, | ||
315 | }; | ||
316 | |||
317 | static struct clk *dsi_parent[8] = { | ||
318 | [0] = &pll1_div2_clk, | ||
319 | [1] = &pll2_clk, | ||
320 | [2] = &main_clk, | ||
321 | [3] = &sh73a0_extal2_clk, | ||
322 | [4] = &sh73a0_extcki_clk, | ||
323 | }; | ||
324 | |||
249 | static struct clk div6_clks[DIV6_NR] = { | 325 | static struct clk div6_clks[DIV6_NR] = { |
250 | [DIV6_VCK1] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR1, 0), | 326 | [DIV6_VCK1] = SH_CLK_DIV6_EXT(VCLKCR1, 0, |
251 | [DIV6_VCK2] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR2, 0), | 327 | vck_parent, ARRAY_SIZE(vck_parent), 12, 3), |
252 | [DIV6_VCK3] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR3, 0), | 328 | [DIV6_VCK2] = SH_CLK_DIV6_EXT(VCLKCR2, 0, |
253 | [DIV6_ZB1] = SH_CLK_DIV6(&pll1_div2_clk, ZBCKCR, CLK_ENABLE_ON_INIT), | 329 | vck_parent, ARRAY_SIZE(vck_parent), 12, 3), |
254 | [DIV6_FLCTL] = SH_CLK_DIV6(&pll1_div2_clk, FLCKCR, 0), | 330 | [DIV6_VCK3] = SH_CLK_DIV6_EXT(VCLKCR3, 0, |
255 | [DIV6_SDHI0] = SH_CLK_DIV6(&pll1_div2_clk, SD0CKCR, 0), | 331 | vck_parent, ARRAY_SIZE(vck_parent), 12, 3), |
256 | [DIV6_SDHI1] = SH_CLK_DIV6(&pll1_div2_clk, SD1CKCR, 0), | 332 | [DIV6_ZB1] = SH_CLK_DIV6_EXT(ZBCKCR, CLK_ENABLE_ON_INIT, |
257 | [DIV6_SDHI2] = SH_CLK_DIV6(&pll1_div2_clk, SD2CKCR, 0), | 333 | pll_parent, ARRAY_SIZE(pll_parent), 7, 1), |
258 | [DIV6_FSIA] = SH_CLK_DIV6(&pll1_div2_clk, FSIACKCR, 0), | 334 | [DIV6_FLCTL] = SH_CLK_DIV6_EXT(FLCKCR, 0, |
259 | [DIV6_FSIB] = SH_CLK_DIV6(&pll1_div2_clk, FSIBCKCR, 0), | 335 | pll_parent, ARRAY_SIZE(pll_parent), 7, 1), |
260 | [DIV6_SUB] = SH_CLK_DIV6(&sh73a0_extal2_clk, SUBCKCR, 0), | 336 | [DIV6_SDHI0] = SH_CLK_DIV6_EXT(SD0CKCR, 0, |
261 | [DIV6_SPUA] = SH_CLK_DIV6(&pll1_div2_clk, SPUACKCR, 0), | 337 | pll_parent, ARRAY_SIZE(pll_parent), 6, 2), |
262 | [DIV6_SPUV] = SH_CLK_DIV6(&pll1_div2_clk, SPUVCKCR, 0), | 338 | [DIV6_SDHI1] = SH_CLK_DIV6_EXT(SD1CKCR, 0, |
263 | [DIV6_MSU] = SH_CLK_DIV6(&pll1_div2_clk, MSUCKCR, 0), | 339 | pll_parent, ARRAY_SIZE(pll_parent), 6, 2), |
264 | [DIV6_HSI] = SH_CLK_DIV6(&pll1_div2_clk, HSICKCR, 0), | 340 | [DIV6_SDHI2] = SH_CLK_DIV6_EXT(SD2CKCR, 0, |
265 | [DIV6_MFG1] = SH_CLK_DIV6(&pll1_div2_clk, MFCK1CR, 0), | 341 | pll_parent, ARRAY_SIZE(pll_parent), 6, 2), |
266 | [DIV6_MFG2] = SH_CLK_DIV6(&pll1_div2_clk, MFCK2CR, 0), | 342 | [DIV6_FSIA] = SH_CLK_DIV6_EXT(FSIACKCR, 0, |
267 | [DIV6_DSIT] = SH_CLK_DIV6(&pll1_div2_clk, DSITCKCR, 0), | 343 | pll_parent, ARRAY_SIZE(pll_parent), 6, 1), |
268 | [DIV6_DSI0P] = SH_CLK_DIV6(&pll1_div2_clk, DSI0PCKCR, 0), | 344 | [DIV6_FSIB] = SH_CLK_DIV6_EXT(FSIBCKCR, 0, |
269 | [DIV6_DSI1P] = SH_CLK_DIV6(&pll1_div2_clk, DSI1PCKCR, 0), | 345 | pll_parent, ARRAY_SIZE(pll_parent), 6, 1), |
346 | [DIV6_SUB] = SH_CLK_DIV6_EXT(SUBCKCR, 0, | ||
347 | pll_extal2_parent, ARRAY_SIZE(pll_extal2_parent), 6, 2), | ||
348 | [DIV6_SPUA] = SH_CLK_DIV6_EXT(SPUACKCR, 0, | ||
349 | pll_extal2_parent, ARRAY_SIZE(pll_extal2_parent), 6, 2), | ||
350 | [DIV6_SPUV] = SH_CLK_DIV6_EXT(SPUVCKCR, 0, | ||
351 | pll_extal2_parent, ARRAY_SIZE(pll_extal2_parent), 6, 2), | ||
352 | [DIV6_MSU] = SH_CLK_DIV6_EXT(MSUCKCR, 0, | ||
353 | pll_parent, ARRAY_SIZE(pll_parent), 7, 1), | ||
354 | [DIV6_HSI] = SH_CLK_DIV6_EXT(HSICKCR, 0, | ||
355 | hsi_parent, ARRAY_SIZE(hsi_parent), 6, 2), | ||
356 | [DIV6_MFG1] = SH_CLK_DIV6_EXT(MFCK1CR, 0, | ||
357 | pll_parent, ARRAY_SIZE(pll_parent), 7, 1), | ||
358 | [DIV6_MFG2] = SH_CLK_DIV6_EXT(MFCK2CR, 0, | ||
359 | pll_parent, ARRAY_SIZE(pll_parent), 7, 1), | ||
360 | [DIV6_DSIT] = SH_CLK_DIV6_EXT(DSITCKCR, 0, | ||
361 | pll_parent, ARRAY_SIZE(pll_parent), 7, 1), | ||
362 | [DIV6_DSI0P] = SH_CLK_DIV6_EXT(DSI0PCKCR, 0, | ||
363 | dsi_parent, ARRAY_SIZE(dsi_parent), 12, 3), | ||
364 | [DIV6_DSI1P] = SH_CLK_DIV6_EXT(DSI1PCKCR, 0, | ||
365 | dsi_parent, ARRAY_SIZE(dsi_parent), 12, 3), | ||
270 | }; | 366 | }; |
271 | 367 | ||
272 | enum { MSTP001, | 368 | enum { MSTP001, |
@@ -403,7 +499,7 @@ void __init sh73a0_clock_init(void) | |||
403 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | 499 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); |
404 | 500 | ||
405 | if (!ret) | 501 | if (!ret) |
406 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); | 502 | ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR); |
407 | 503 | ||
408 | if (!ret) | 504 | if (!ret) |
409 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | 505 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); |
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index be78a2c73db4..13a18d343ecb 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -46,6 +46,8 @@ extern void sh73a0_clock_init(void); | |||
46 | extern void sh73a0_pinmux_init(void); | 46 | extern void sh73a0_pinmux_init(void); |
47 | extern struct clk sh73a0_extal1_clk; | 47 | extern struct clk sh73a0_extal1_clk; |
48 | extern struct clk sh73a0_extal2_clk; | 48 | extern struct clk sh73a0_extal2_clk; |
49 | extern struct clk sh73a0_extcki_clk; | ||
50 | extern struct clk sh73a0_extalr_clk; | ||
49 | 51 | ||
50 | extern unsigned int sh73a0_get_core_count(void); | 52 | extern unsigned int sh73a0_get_core_count(void); |
51 | extern void sh73a0_secondary_init(unsigned int cpu); | 53 | extern void sh73a0_secondary_init(unsigned int cpu); |