diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/clock-r8a7740.c | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index 1feb9a2286a8..161e128e2157 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -323,6 +323,7 @@ struct clk *main_clks[] = { | |||
323 | &fsibck_clk, | 323 | &fsibck_clk, |
324 | }; | 324 | }; |
325 | 325 | ||
326 | /* DIV4 clocks */ | ||
326 | static void div4_kick(struct clk *clk) | 327 | static void div4_kick(struct clk *clk) |
327 | { | 328 | { |
328 | unsigned long value; | 329 | unsigned long value; |
@@ -346,6 +347,26 @@ static struct clk_div4_table div4_table = { | |||
346 | .kick = div4_kick, | 347 | .kick = div4_kick, |
347 | }; | 348 | }; |
348 | 349 | ||
350 | enum { | ||
351 | DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_HP, | ||
352 | DIV4_HPP, DIV4_USBP, DIV4_S, DIV4_ZB, DIV4_M3, DIV4_CP, | ||
353 | DIV4_NR | ||
354 | }; | ||
355 | |||
356 | struct clk div4_clks[DIV4_NR] = { | ||
357 | [DIV4_I] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 20, 0x6fff, CLK_ENABLE_ON_INIT), | ||
358 | [DIV4_ZG] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 16, 0x6fff, CLK_ENABLE_ON_INIT), | ||
359 | [DIV4_B] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 8, 0x6fff, CLK_ENABLE_ON_INIT), | ||
360 | [DIV4_M1] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 4, 0x6fff, CLK_ENABLE_ON_INIT), | ||
361 | [DIV4_HP] = SH_CLK_DIV4(&pllc1_clk, FRQCRB, 4, 0x6fff, 0), | ||
362 | [DIV4_HPP] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 20, 0x6fff, 0), | ||
363 | [DIV4_USBP] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 16, 0x6fff, 0), | ||
364 | [DIV4_S] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 12, 0x6fff, 0), | ||
365 | [DIV4_ZB] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 8, 0x6fff, 0), | ||
366 | [DIV4_M3] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 4, 0x6fff, 0), | ||
367 | [DIV4_CP] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 0, 0x6fff, 0), | ||
368 | }; | ||
369 | |||
349 | /* DIV6 reparent */ | 370 | /* DIV6 reparent */ |
350 | enum { | 371 | enum { |
351 | DIV6_HDMI, | 372 | DIV6_HDMI, |
@@ -391,6 +412,16 @@ static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { | |||
391 | fsib_parents, ARRAY_SIZE(fsib_parents), 6, 2), | 412 | fsib_parents, ARRAY_SIZE(fsib_parents), 6, 2), |
392 | }; | 413 | }; |
393 | 414 | ||
415 | /* DIV6 clocks */ | ||
416 | enum { | ||
417 | DIV6_SUB, | ||
418 | DIV6_NR | ||
419 | }; | ||
420 | |||
421 | static struct clk div6_clks[DIV6_NR] = { | ||
422 | [DIV6_SUB] = SH_CLK_DIV6(&pllc1_div2_clk, SUBCKCR, 0), | ||
423 | }; | ||
424 | |||
394 | /* HDMI1/2 clock */ | 425 | /* HDMI1/2 clock */ |
395 | static unsigned long hdmi12_recalc(struct clk *clk) | 426 | static unsigned long hdmi12_recalc(struct clk *clk) |
396 | { | 427 | { |
@@ -456,35 +487,6 @@ static struct clk fsidivs[] = { | |||
456 | 487 | ||
457 | /* MSTP */ | 488 | /* MSTP */ |
458 | enum { | 489 | enum { |
459 | DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_HP, | ||
460 | DIV4_HPP, DIV4_USBP, DIV4_S, DIV4_ZB, DIV4_M3, DIV4_CP, | ||
461 | DIV4_NR | ||
462 | }; | ||
463 | |||
464 | struct clk div4_clks[DIV4_NR] = { | ||
465 | [DIV4_I] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 20, 0x6fff, CLK_ENABLE_ON_INIT), | ||
466 | [DIV4_ZG] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 16, 0x6fff, CLK_ENABLE_ON_INIT), | ||
467 | [DIV4_B] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 8, 0x6fff, CLK_ENABLE_ON_INIT), | ||
468 | [DIV4_M1] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 4, 0x6fff, CLK_ENABLE_ON_INIT), | ||
469 | [DIV4_HP] = SH_CLK_DIV4(&pllc1_clk, FRQCRB, 4, 0x6fff, 0), | ||
470 | [DIV4_HPP] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 20, 0x6fff, 0), | ||
471 | [DIV4_USBP] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 16, 0x6fff, 0), | ||
472 | [DIV4_S] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 12, 0x6fff, 0), | ||
473 | [DIV4_ZB] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 8, 0x6fff, 0), | ||
474 | [DIV4_M3] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 4, 0x6fff, 0), | ||
475 | [DIV4_CP] = SH_CLK_DIV4(&pllc1_clk, FRQCRC, 0, 0x6fff, 0), | ||
476 | }; | ||
477 | |||
478 | enum { | ||
479 | DIV6_SUB, | ||
480 | DIV6_NR | ||
481 | }; | ||
482 | |||
483 | static struct clk div6_clks[DIV6_NR] = { | ||
484 | [DIV6_SUB] = SH_CLK_DIV6(&pllc1_div2_clk, SUBCKCR, 0), | ||
485 | }; | ||
486 | |||
487 | enum { | ||
488 | MSTP128, MSTP127, MSTP125, | 490 | MSTP128, MSTP127, MSTP125, |
489 | MSTP116, MSTP111, MSTP100, MSTP117, | 491 | MSTP116, MSTP111, MSTP100, MSTP117, |
490 | 492 | ||