diff options
-rw-r--r-- | arch/arm/plat-s5pc1xx/s5pc100-clock.c | 250 |
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 | ||
449 | static struct clk clk_iis_cd0 = { | ||
450 | .name = "iis_cdclk0", | ||
451 | .id = -1, | ||
452 | }; | ||
453 | |||
454 | static struct clk clk_iis_cd1 = { | ||
455 | .name = "iis_cdclk1", | ||
456 | .id = -1, | ||
457 | }; | ||
458 | |||
459 | static struct clk clk_iis_cd2 = { | ||
460 | .name = "iis_cdclk2", | ||
461 | .id = -1, | ||
462 | }; | ||
463 | |||
464 | static struct clk clk_pcm_cd0 = { | ||
465 | .name = "pcm_cdclk0", | ||
466 | .id = -1, | ||
467 | }; | ||
468 | |||
469 | static struct clk clk_pcm_cd1 = { | ||
470 | .name = "pcm_cdclk1", | ||
471 | .id = -1, | ||
472 | }; | ||
473 | |||
474 | static 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 | |||
483 | static struct clksrc_sources clkset_audio0 = { | ||
484 | .sources = clkset_audio0_list, | ||
485 | .nr_sources = ARRAY_SIZE(clkset_audio0_list), | ||
486 | }; | ||
487 | |||
449 | static struct clk *clkset_spi_list[] = { | 488 | static 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 | ||
500 | static struct clk *clkset_uart_list[] = { | ||
501 | &clk_mout_epll.clk, | ||
502 | &clk_dout_mpll, | ||
503 | }; | ||
504 | |||
505 | static struct clksrc_sources clkset_uart = { | ||
506 | .sources = clkset_uart_list, | ||
507 | .nr_sources = ARRAY_SIZE(clkset_uart_list), | ||
508 | }; | ||
509 | |||
510 | static 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 | |||
519 | static struct clksrc_sources clkset_audio1 = { | ||
520 | .sources = clkset_audio1_list, | ||
521 | .nr_sources = ARRAY_SIZE(clkset_audio1_list), | ||
522 | }; | ||
523 | |||
524 | static 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 | |||
532 | static struct clksrc_sources clkset_audio2 = { | ||
533 | .sources = clkset_audio2_list, | ||
534 | .nr_sources = ARRAY_SIZE(clkset_audio2_list), | ||
535 | }; | ||
536 | |||
537 | static struct clksrc_clk clk_audio0; | ||
538 | static struct clksrc_clk clk_audio1; | ||
539 | static struct clksrc_clk clk_audio2; | ||
540 | |||
541 | static struct clk *clkset_spdif_list[] = { | ||
542 | &clk_audio0.clk, | ||
543 | &clk_audio1.clk, | ||
544 | &clk_audio2.clk, | ||
545 | }; | ||
546 | |||
547 | static struct clksrc_sources clkset_spdif = { | ||
548 | .sources = clkset_spdif_list, | ||
549 | .nr_sources = ARRAY_SIZE(clkset_spdif_list), | ||
550 | }; | ||
551 | |||
552 | static 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 | |||
559 | static struct clksrc_sources clkset_lcd_fimc = { | ||
560 | .sources = clkset_lcd_fimc_list, | ||
561 | .nr_sources = ARRAY_SIZE(clkset_lcd_fimc_list), | ||
562 | }; | ||
563 | |||
564 | static 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 | |||
571 | static struct clksrc_sources clkset_mmc = { | ||
572 | .sources = clkset_mmc_list, | ||
573 | .nr_sources = ARRAY_SIZE(clkset_mmc_list), | ||
574 | }; | ||
575 | |||
576 | static struct clk *clkset_usbhost_list[] = { | ||
577 | &clk_mout_epll.clk, | ||
578 | &clk_dout_mpll, | ||
579 | &clk_mout_hpll.clk, | ||
580 | &clk_48m, | ||
581 | }; | ||
582 | |||
583 | static struct clksrc_sources clkset_usbhost = { | ||
584 | .sources = clkset_usbhost_list, | ||
585 | .nr_sources = ARRAY_SIZE(clkset_usbhost_list), | ||
586 | }; | ||
587 | |||
461 | static struct clksrc_clk clk_spi0 = { | 588 | static 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 | ||
498 | static struct clk *clkset_uart_list[] = { | ||
499 | &clk_mout_epll.clk, | ||
500 | &clk_dout_mpll, | ||
501 | }; | ||
502 | |||
503 | static struct clksrc_sources clkset_uart = { | ||
504 | .sources = clkset_uart_list, | ||
505 | .nr_sources = ARRAY_SIZE(clkset_uart_list), | ||
506 | }; | ||
507 | |||
508 | static struct clksrc_clk clk_uart_uclk1 = { | 625 | static 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 | ||
520 | static struct clk clk_iis_cd0 = { | ||
521 | .name = "iis_cdclk0", | ||
522 | .id = -1, | ||
523 | }; | ||
524 | |||
525 | static struct clk clk_iis_cd1 = { | ||
526 | .name = "iis_cdclk1", | ||
527 | .id = -1, | ||
528 | }; | ||
529 | |||
530 | static struct clk clk_iis_cd2 = { | ||
531 | .name = "iis_cdclk2", | ||
532 | .id = -1, | ||
533 | }; | ||
534 | |||
535 | static struct clk clk_pcm_cd0 = { | ||
536 | .name = "pcm_cdclk0", | ||
537 | .id = -1, | ||
538 | }; | ||
539 | |||
540 | static struct clk clk_pcm_cd1 = { | ||
541 | .name = "pcm_cdclk1", | ||
542 | .id = -1, | ||
543 | }; | ||
544 | |||
545 | static 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 | |||
554 | static struct clksrc_sources clkset_audio0 = { | ||
555 | .sources = clkset_audio0_list, | ||
556 | .nr_sources = ARRAY_SIZE(clkset_audio0_list), | ||
557 | }; | ||
558 | |||
559 | static struct clksrc_clk clk_audio0 = { | 637 | static 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 | ||
571 | static 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 | |||
580 | static struct clksrc_sources clkset_audio1 = { | ||
581 | .sources = clkset_audio1_list, | ||
582 | .nr_sources = ARRAY_SIZE(clkset_audio1_list), | ||
583 | }; | ||
584 | |||
585 | static struct clksrc_clk clk_audio1 = { | 649 | static 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 | ||
597 | static 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 | |||
605 | static struct clksrc_sources clkset_audio2 = { | ||
606 | .sources = clkset_audio2_list, | ||
607 | .nr_sources = ARRAY_SIZE(clkset_audio2_list), | ||
608 | }; | ||
609 | 661 | ||
610 | static struct clksrc_clk clk_audio2 = { | 662 | static 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 | ||
622 | static struct clk *clkset_spdif_list[] = { | ||
623 | &clk_audio0.clk, | ||
624 | &clk_audio1.clk, | ||
625 | &clk_audio2.clk, | ||
626 | }; | ||
627 | |||
628 | static struct clksrc_sources clkset_spdif = { | ||
629 | .sources = clkset_spdif_list, | ||
630 | .nr_sources = ARRAY_SIZE(clkset_spdif_list), | ||
631 | }; | ||
632 | |||
633 | static struct clksrc_clk clk_spdif = { | 674 | static 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 | ||
642 | static 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 | |||
649 | static struct clksrc_sources clkset_lcd_fimc = { | ||
650 | .sources = clkset_lcd_fimc_list, | ||
651 | .nr_sources = ARRAY_SIZE(clkset_lcd_fimc_list), | ||
652 | }; | ||
653 | |||
654 | static struct clksrc_clk clk_lcd = { | 683 | static 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 | ||
702 | static 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 | |||
709 | static struct clksrc_sources clkset_mmc = { | ||
710 | .sources = clkset_mmc_list, | ||
711 | .nr_sources = ARRAY_SIZE(clkset_mmc_list), | ||
712 | }; | ||
713 | |||
714 | static struct clksrc_clk clk_mmc0 = { | 731 | static 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 | |||
751 | static struct clk *clkset_usbhost_list[] = { | ||
752 | &clk_mout_epll.clk, | ||
753 | &clk_dout_mpll, | ||
754 | &clk_mout_hpll.clk, | ||
755 | &clk_48m, | ||
756 | }; | ||
757 | |||
758 | static struct clksrc_sources clkset_usbhost = { | ||
759 | .sources = clkset_usbhost_list, | ||
760 | .nr_sources = ARRAY_SIZE(clkset_usbhost_list), | ||
761 | }; | ||
762 | |||
763 | static struct clksrc_clk clk_usbhost = { | 767 | static struct clksrc_clk clk_usbhost = { |
764 | .clk = { | 768 | .clk = { |
765 | .name = "usbhost", | 769 | .name = "usbhost", |