aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5pc1xx
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-01-11 22:39:58 -0500
committerBen Dooks <ben-linux@fluff.org>2010-01-15 03:10:15 -0500
commit1d026d9b1671bcb05e7b00f545f1d62476e9063c (patch)
tree7d8f9c518be7cd0ad1ccb383d317749518c0c2d8 /arch/arm/plat-s5pc1xx
parent45426468148d77e8c5eaece21d2a16e063066567 (diff)
ARM: S5PC1XX: Move clock definitions around ready to turn into clksrc arrays
Move the clock definitions around ready to turn the clocks into an array of clocks and register them in one go. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s5pc1xx')
-rw-r--r--arch/arm/plat-s5pc1xx/s5pc100-clock.c250
1 files changed, 127 insertions, 123 deletions
diff --git a/arch/arm/plat-s5pc1xx/s5pc100-clock.c b/arch/arm/plat-s5pc1xx/s5pc100-clock.c
index 52c032c9d7bc..a9e37302f82f 100644
--- a/arch/arm/plat-s5pc1xx/s5pc100-clock.c
+++ b/arch/arm/plat-s5pc1xx/s5pc100-clock.c
@@ -446,6 +446,45 @@ static struct clksrc_clk clk_mout_hpll = {
446 * have a common parent divisor so are not included here. 446 * have a common parent divisor so are not included here.
447 */ 447 */
448 448
449static struct clk clk_iis_cd0 = {
450 .name = "iis_cdclk0",
451 .id = -1,
452};
453
454static struct clk clk_iis_cd1 = {
455 .name = "iis_cdclk1",
456 .id = -1,
457};
458
459static struct clk clk_iis_cd2 = {
460 .name = "iis_cdclk2",
461 .id = -1,
462};
463
464static struct clk clk_pcm_cd0 = {
465 .name = "pcm_cdclk0",
466 .id = -1,
467};
468
469static struct clk clk_pcm_cd1 = {
470 .name = "pcm_cdclk1",
471 .id = -1,
472};
473
474static struct clk *clkset_audio0_list[] = {
475 &clk_mout_epll.clk,
476 &clk_dout_mpll,
477 &clk_fin_epll,
478 &clk_iis_cd0,
479 &clk_pcm_cd0,
480 &clk_mout_hpll.clk,
481};
482
483static struct clksrc_sources clkset_audio0 = {
484 .sources = clkset_audio0_list,
485 .nr_sources = ARRAY_SIZE(clkset_audio0_list),
486};
487
449static struct clk *clkset_spi_list[] = { 488static struct clk *clkset_spi_list[] = {
450 &clk_mout_epll.clk, 489 &clk_mout_epll.clk,
451 &clk_dout_mpll2, 490 &clk_dout_mpll2,
@@ -458,6 +497,94 @@ static struct clksrc_sources clkset_spi = {
458 .nr_sources = ARRAY_SIZE(clkset_spi_list), 497 .nr_sources = ARRAY_SIZE(clkset_spi_list),
459}; 498};
460 499
500static struct clk *clkset_uart_list[] = {
501 &clk_mout_epll.clk,
502 &clk_dout_mpll,
503};
504
505static struct clksrc_sources clkset_uart = {
506 .sources = clkset_uart_list,
507 .nr_sources = ARRAY_SIZE(clkset_uart_list),
508};
509
510static struct clk *clkset_audio1_list[] = {
511 &clk_mout_epll.clk,
512 &clk_dout_mpll,
513 &clk_fin_epll,
514 &clk_iis_cd1,
515 &clk_pcm_cd1,
516 &clk_mout_hpll.clk,
517};
518
519static struct clksrc_sources clkset_audio1 = {
520 .sources = clkset_audio1_list,
521 .nr_sources = ARRAY_SIZE(clkset_audio1_list),
522};
523
524static struct clk *clkset_audio2_list[] = {
525 &clk_mout_epll.clk,
526 &clk_dout_mpll,
527 &clk_fin_epll,
528 &clk_iis_cd2,
529 &clk_mout_hpll.clk,
530};
531
532static struct clksrc_sources clkset_audio2 = {
533 .sources = clkset_audio2_list,
534 .nr_sources = ARRAY_SIZE(clkset_audio2_list),
535};
536
537static struct clksrc_clk clk_audio0;
538static struct clksrc_clk clk_audio1;
539static struct clksrc_clk clk_audio2;
540
541static struct clk *clkset_spdif_list[] = {
542 &clk_audio0.clk,
543 &clk_audio1.clk,
544 &clk_audio2.clk,
545};
546
547static struct clksrc_sources clkset_spdif = {
548 .sources = clkset_spdif_list,
549 .nr_sources = ARRAY_SIZE(clkset_spdif_list),
550};
551
552static struct clk *clkset_lcd_fimc_list[] = {
553 &clk_mout_epll.clk,
554 &clk_dout_mpll,
555 &clk_mout_hpll.clk,
556 &clk_vclk_54m,
557};
558
559static struct clksrc_sources clkset_lcd_fimc = {
560 .sources = clkset_lcd_fimc_list,
561 .nr_sources = ARRAY_SIZE(clkset_lcd_fimc_list),
562};
563
564static struct clk *clkset_mmc_list[] = {
565 &clk_mout_epll.clk,
566 &clk_dout_mpll,
567 &clk_fin_epll,
568 &clk_mout_hpll.clk ,
569};
570
571static struct clksrc_sources clkset_mmc = {
572 .sources = clkset_mmc_list,
573 .nr_sources = ARRAY_SIZE(clkset_mmc_list),
574};
575
576static struct clk *clkset_usbhost_list[] = {
577 &clk_mout_epll.clk,
578 &clk_dout_mpll,
579 &clk_mout_hpll.clk,
580 &clk_48m,
581};
582
583static struct clksrc_sources clkset_usbhost = {
584 .sources = clkset_usbhost_list,
585 .nr_sources = ARRAY_SIZE(clkset_usbhost_list),
586};
587
461static struct clksrc_clk clk_spi0 = { 588static struct clksrc_clk clk_spi0 = {
462 .clk = { 589 .clk = {
463 .name = "spi_bus", 590 .name = "spi_bus",
@@ -495,16 +622,6 @@ static struct clksrc_clk clk_spi2 = {
495 .reg_src = { .reg = S5PC100_CLKSRC1, .shift = 12, .size = 2, }, 622 .reg_src = { .reg = S5PC100_CLKSRC1, .shift = 12, .size = 2, },
496}; 623};
497 624
498static struct clk *clkset_uart_list[] = {
499 &clk_mout_epll.clk,
500 &clk_dout_mpll,
501};
502
503static struct clksrc_sources clkset_uart = {
504 .sources = clkset_uart_list,
505 .nr_sources = ARRAY_SIZE(clkset_uart_list),
506};
507
508static struct clksrc_clk clk_uart_uclk1 = { 625static struct clksrc_clk clk_uart_uclk1 = {
509 .clk = { 626 .clk = {
510 .name = "uclk1", 627 .name = "uclk1",
@@ -517,45 +634,6 @@ static struct clksrc_clk clk_uart_uclk1 = {
517 .reg_src = { .reg = S5PC100_CLKSRC1, .shift = 0, .size = 1, }, 634 .reg_src = { .reg = S5PC100_CLKSRC1, .shift = 0, .size = 1, },
518}; 635};
519 636
520static struct clk clk_iis_cd0 = {
521 .name = "iis_cdclk0",
522 .id = -1,
523};
524
525static struct clk clk_iis_cd1 = {
526 .name = "iis_cdclk1",
527 .id = -1,
528};
529
530static struct clk clk_iis_cd2 = {
531 .name = "iis_cdclk2",
532 .id = -1,
533};
534
535static struct clk clk_pcm_cd0 = {
536 .name = "pcm_cdclk0",
537 .id = -1,
538};
539
540static struct clk clk_pcm_cd1 = {
541 .name = "pcm_cdclk1",
542 .id = -1,
543};
544
545static struct clk *clkset_audio0_list[] = {
546 &clk_mout_epll.clk,
547 &clk_dout_mpll,
548 &clk_fin_epll,
549 &clk_iis_cd0,
550 &clk_pcm_cd0,
551 &clk_mout_hpll.clk,
552};
553
554static struct clksrc_sources clkset_audio0 = {
555 .sources = clkset_audio0_list,
556 .nr_sources = ARRAY_SIZE(clkset_audio0_list),
557};
558
559static struct clksrc_clk clk_audio0 = { 637static struct clksrc_clk clk_audio0 = {
560 .clk = { 638 .clk = {
561 .name = "audio-bus", 639 .name = "audio-bus",
@@ -568,20 +646,6 @@ static struct clksrc_clk clk_audio0 = {
568 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 12, .size = 3, }, 646 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 12, .size = 3, },
569}; 647};
570 648
571static struct clk *clkset_audio1_list[] = {
572 &clk_mout_epll.clk,
573 &clk_dout_mpll,
574 &clk_fin_epll,
575 &clk_iis_cd1,
576 &clk_pcm_cd1,
577 &clk_mout_hpll.clk,
578};
579
580static struct clksrc_sources clkset_audio1 = {
581 .sources = clkset_audio1_list,
582 .nr_sources = ARRAY_SIZE(clkset_audio1_list),
583};
584
585static struct clksrc_clk clk_audio1 = { 649static struct clksrc_clk clk_audio1 = {
586 .clk = { 650 .clk = {
587 .name = "audio-bus", 651 .name = "audio-bus",
@@ -594,18 +658,6 @@ static struct clksrc_clk clk_audio1 = {
594 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 16, .size = 3, }, 658 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 16, .size = 3, },
595}; 659};
596 660
597static struct clk *clkset_audio2_list[] = {
598 &clk_mout_epll.clk,
599 &clk_dout_mpll,
600 &clk_fin_epll,
601 &clk_iis_cd2,
602 &clk_mout_hpll.clk,
603};
604
605static struct clksrc_sources clkset_audio2 = {
606 .sources = clkset_audio2_list,
607 .nr_sources = ARRAY_SIZE(clkset_audio2_list),
608};
609 661
610static struct clksrc_clk clk_audio2 = { 662static struct clksrc_clk clk_audio2 = {
611 .clk = { 663 .clk = {
@@ -619,17 +671,6 @@ static struct clksrc_clk clk_audio2 = {
619 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 20, .size = 3, }, 671 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 20, .size = 3, },
620}; 672};
621 673
622static struct clk *clkset_spdif_list[] = {
623 &clk_audio0.clk,
624 &clk_audio1.clk,
625 &clk_audio2.clk,
626};
627
628static struct clksrc_sources clkset_spdif = {
629 .sources = clkset_spdif_list,
630 .nr_sources = ARRAY_SIZE(clkset_spdif_list),
631};
632
633static struct clksrc_clk clk_spdif = { 674static struct clksrc_clk clk_spdif = {
634 .clk = { 675 .clk = {
635 .name = "spdif", 676 .name = "spdif",
@@ -639,18 +680,6 @@ static struct clksrc_clk clk_spdif = {
639 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 24, .size = 2, }, 680 .reg_src = { .reg = S5PC100_CLKSRC3, .shift = 24, .size = 2, },
640}; 681};
641 682
642static struct clk *clkset_lcd_fimc_list[] = {
643 &clk_mout_epll.clk,
644 &clk_dout_mpll,
645 &clk_mout_hpll.clk,
646 &clk_vclk_54m,
647};
648
649static struct clksrc_sources clkset_lcd_fimc = {
650 .sources = clkset_lcd_fimc_list,
651 .nr_sources = ARRAY_SIZE(clkset_lcd_fimc_list),
652};
653
654static struct clksrc_clk clk_lcd = { 683static struct clksrc_clk clk_lcd = {
655 .clk = { 684 .clk = {
656 .name = "lcd", 685 .name = "lcd",
@@ -699,18 +728,6 @@ static struct clksrc_clk clk_fimc2 = {
699 .reg_src = { .reg = S5PC100_CLKSRC2, .shift = 24, .size = 2, }, 728 .reg_src = { .reg = S5PC100_CLKSRC2, .shift = 24, .size = 2, },
700}; 729};
701 730
702static struct clk *clkset_mmc_list[] = {
703 &clk_mout_epll.clk,
704 &clk_dout_mpll,
705 &clk_fin_epll,
706 &clk_mout_hpll.clk ,
707};
708
709static struct clksrc_sources clkset_mmc = {
710 .sources = clkset_mmc_list,
711 .nr_sources = ARRAY_SIZE(clkset_mmc_list),
712};
713
714static struct clksrc_clk clk_mmc0 = { 731static struct clksrc_clk clk_mmc0 = {
715 .clk = { 732 .clk = {
716 .name = "mmc_bus", 733 .name = "mmc_bus",
@@ -747,19 +764,6 @@ static struct clksrc_clk clk_mmc2 = {
747 .reg_src = { .reg = S5PC100_CLKSRC2, .shift = 8, .size = 2, }, 764 .reg_src = { .reg = S5PC100_CLKSRC2, .shift = 8, .size = 2, },
748}; 765};
749 766
750
751static struct clk *clkset_usbhost_list[] = {
752 &clk_mout_epll.clk,
753 &clk_dout_mpll,
754 &clk_mout_hpll.clk,
755 &clk_48m,
756};
757
758static struct clksrc_sources clkset_usbhost = {
759 .sources = clkset_usbhost_list,
760 .nr_sources = ARRAY_SIZE(clkset_usbhost_list),
761};
762
763static struct clksrc_clk clk_usbhost = { 767static struct clksrc_clk clk_usbhost = {
764 .clk = { 768 .clk = {
765 .name = "usbhost", 769 .name = "usbhost",