aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s5pv210/clock.c125
1 files changed, 125 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index c03e2880518a..015471040f56 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -199,6 +199,21 @@ static struct clk clk_sclk_usbphy1 = {
199 .id = -1, 199 .id = -1,
200}; 200};
201 201
202static struct clk clk_pcmcdclk0 = {
203 .name = "pcmcdclk",
204 .id = -1,
205};
206
207static struct clk clk_pcmcdclk1 = {
208 .name = "pcmcdclk",
209 .id = -1,
210};
211
212static struct clk clk_pcmcdclk2 = {
213 .name = "pcmcdclk",
214 .id = -1,
215};
216
202static struct clk *clkset_vpllsrc_list[] = { 217static struct clk *clkset_vpllsrc_list[] = {
203 [0] = &clk_fin_vpll, 218 [0] = &clk_fin_vpll,
204 [1] = &clk_sclk_hdmi27m, 219 [1] = &clk_sclk_hdmi27m,
@@ -524,6 +539,104 @@ static struct clksrc_sources clkset_sclk_mixer = {
524 .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list), 539 .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list),
525}; 540};
526 541
542static struct clk *clkset_sclk_audio0_list[] = {
543 [0] = &clk_ext_xtal_mux,
544 [1] = &clk_pcmcdclk0,
545 [2] = &clk_sclk_hdmi27m,
546 [3] = &clk_sclk_usbphy0,
547 [4] = &clk_sclk_usbphy1,
548 [5] = &clk_sclk_hdmiphy,
549 [6] = &clk_mout_mpll.clk,
550 [7] = &clk_mout_epll.clk,
551 [8] = &clk_sclk_vpll.clk,
552};
553
554static struct clksrc_sources clkset_sclk_audio0 = {
555 .sources = clkset_sclk_audio0_list,
556 .nr_sources = ARRAY_SIZE(clkset_sclk_audio0_list),
557};
558
559static struct clksrc_clk clk_sclk_audio0 = {
560 .clk = {
561 .name = "sclk_audio",
562 .id = 0,
563 .enable = s5pv210_clk_ip3_ctrl,
564 .ctrlbit = (1 << 4),
565 },
566 .sources = &clkset_sclk_audio0,
567 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 0, .size = 4 },
568 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 0, .size = 4 },
569};
570
571static struct clk *clkset_sclk_audio1_list[] = {
572 [0] = &clk_ext_xtal_mux,
573 [1] = &clk_pcmcdclk1,
574 [2] = &clk_sclk_hdmi27m,
575 [3] = &clk_sclk_usbphy0,
576 [4] = &clk_sclk_usbphy1,
577 [5] = &clk_sclk_hdmiphy,
578 [6] = &clk_mout_mpll.clk,
579 [7] = &clk_mout_epll.clk,
580 [8] = &clk_sclk_vpll.clk,
581};
582
583static struct clksrc_sources clkset_sclk_audio1 = {
584 .sources = clkset_sclk_audio1_list,
585 .nr_sources = ARRAY_SIZE(clkset_sclk_audio1_list),
586};
587
588static struct clksrc_clk clk_sclk_audio1 = {
589 .clk = {
590 .name = "sclk_audio",
591 .id = 1,
592 .enable = s5pv210_clk_ip3_ctrl,
593 .ctrlbit = (1 << 5),
594 },
595 .sources = &clkset_sclk_audio1,
596 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 4, .size = 4 },
597 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 4, .size = 4 },
598};
599
600static struct clk *clkset_sclk_audio2_list[] = {
601 [0] = &clk_ext_xtal_mux,
602 [1] = &clk_pcmcdclk0,
603 [2] = &clk_sclk_hdmi27m,
604 [3] = &clk_sclk_usbphy0,
605 [4] = &clk_sclk_usbphy1,
606 [5] = &clk_sclk_hdmiphy,
607 [6] = &clk_mout_mpll.clk,
608 [7] = &clk_mout_epll.clk,
609 [8] = &clk_sclk_vpll.clk,
610};
611
612static struct clksrc_sources clkset_sclk_audio2 = {
613 .sources = clkset_sclk_audio2_list,
614 .nr_sources = ARRAY_SIZE(clkset_sclk_audio2_list),
615};
616
617static struct clksrc_clk clk_sclk_audio2 = {
618 .clk = {
619 .name = "sclk_audio",
620 .id = 2,
621 .enable = s5pv210_clk_ip3_ctrl,
622 .ctrlbit = (1 << 6),
623 },
624 .sources = &clkset_sclk_audio2,
625 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 8, .size = 4 },
626 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 8, .size = 4 },
627};
628
629static struct clk *clkset_sclk_spdif_list[] = {
630 [0] = &clk_sclk_audio0.clk,
631 [1] = &clk_sclk_audio1.clk,
632 [2] = &clk_sclk_audio2.clk,
633};
634
635static struct clksrc_sources clkset_sclk_spdif = {
636 .sources = clkset_sclk_spdif_list,
637 .nr_sources = ARRAY_SIZE(clkset_sclk_spdif_list),
638};
639
527static struct clksrc_clk clksrcs[] = { 640static struct clksrc_clk clksrcs[] = {
528 { 641 {
529 .clk = { 642 .clk = {
@@ -560,6 +673,15 @@ static struct clksrc_clk clksrcs[] = {
560 }, 673 },
561 .sources = &clkset_sclk_mixer, 674 .sources = &clkset_sclk_mixer,
562 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 }, 675 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 },
676 }, {
677 .clk = {
678 .name = "sclk_spdif",
679 .id = -1,
680 .enable = s5pv210_clk_mask0_ctrl,
681 .ctrlbit = (1 << 27),
682 },
683 .sources = &clkset_sclk_spdif,
684 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 12, .size = 2 },
563 }, 685 },
564}; 686};
565 687
@@ -658,6 +780,9 @@ static struct clk *clks[] __initdata = {
658 &clk_sclk_hdmiphy, 780 &clk_sclk_hdmiphy,
659 &clk_sclk_usbphy0, 781 &clk_sclk_usbphy0,
660 &clk_sclk_usbphy1, 782 &clk_sclk_usbphy1,
783 &clk_pcmcdclk0,
784 &clk_pcmcdclk1,
785 &clk_pcmcdclk2,
661}; 786};
662 787
663void __init s5pv210_register_clocks(void) 788void __init s5pv210_register_clocks(void)