diff options
author | Vipul Kumar Samar <vipulkumar.samar@st.com> | 2012-11-10 01:43:43 -0500 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2012-11-21 14:45:45 -0500 |
commit | 1249979242db10d2fe1793f26e7658d94b7bf6dc (patch) | |
tree | 893efc50099b1ad06e137af84c5cd37f7b33c3b2 /drivers/clk/spear/spear1340_clock.c | |
parent | 463f9e209ca69d52344479544d1e52c02f2e6918 (diff) |
CLK: SPEAr: Set CLK_SET_RATE_PARENT for few clocks
Flag CLK_SET_RATE_PARENT is required for a clock, where we want to
propagate clk_set_rate to its parent. This patch adds this to multiple clocks.
Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Vijay Kumar Mishra <vijay.kumar@st.com>
Signed-off-by: Vijay Kumar Mishra <vijay.kumar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/spear/spear1340_clock.c')
-rw-r--r-- | drivers/clk/spear/spear1340_clock.c | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c index 020431ac163d..aa5ed435fbad 100644 --- a/drivers/clk/spear/spear1340_clock.c +++ b/drivers/clk/spear/spear1340_clock.c | |||
@@ -594,14 +594,14 @@ void __init spear1340_clk_init(void) | |||
594 | clk_register_clkdev(clk1, "uart0_syn_gclk", NULL); | 594 | clk_register_clkdev(clk1, "uart0_syn_gclk", NULL); |
595 | 595 | ||
596 | clk = clk_register_mux(NULL, "uart0_mclk", uart0_parents, | 596 | clk = clk_register_mux(NULL, "uart0_mclk", uart0_parents, |
597 | ARRAY_SIZE(uart0_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 597 | ARRAY_SIZE(uart0_parents), CLK_SET_RATE_PARENT, |
598 | SPEAR1340_UART0_CLK_SHIFT, SPEAR1340_UART_CLK_MASK, 0, | 598 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_UART0_CLK_SHIFT, |
599 | &_lock); | 599 | SPEAR1340_UART_CLK_MASK, 0, &_lock); |
600 | clk_register_clkdev(clk, "uart0_mclk", NULL); | 600 | clk_register_clkdev(clk, "uart0_mclk", NULL); |
601 | 601 | ||
602 | clk = clk_register_gate(NULL, "uart0_clk", "uart0_mclk", 0, | 602 | clk = clk_register_gate(NULL, "uart0_clk", "uart0_mclk", |
603 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_UART0_CLK_ENB, 0, | 603 | CLK_SET_RATE_PARENT, SPEAR1340_PERIP1_CLK_ENB, |
604 | &_lock); | 604 | SPEAR1340_UART0_CLK_ENB, 0, &_lock); |
605 | clk_register_clkdev(clk, NULL, "e0000000.serial"); | 605 | clk_register_clkdev(clk, NULL, "e0000000.serial"); |
606 | 606 | ||
607 | clk = clk_register_aux("uart1_syn_clk", "uart1_syn_gclk", | 607 | clk = clk_register_aux("uart1_syn_clk", "uart1_syn_gclk", |
@@ -627,9 +627,9 @@ void __init spear1340_clk_init(void) | |||
627 | clk_register_clkdev(clk, "sdhci_syn_clk", NULL); | 627 | clk_register_clkdev(clk, "sdhci_syn_clk", NULL); |
628 | clk_register_clkdev(clk1, "sdhci_syn_gclk", NULL); | 628 | clk_register_clkdev(clk1, "sdhci_syn_gclk", NULL); |
629 | 629 | ||
630 | clk = clk_register_gate(NULL, "sdhci_clk", "sdhci_syn_gclk", 0, | 630 | clk = clk_register_gate(NULL, "sdhci_clk", "sdhci_syn_gclk", |
631 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_SDHCI_CLK_ENB, 0, | 631 | CLK_SET_RATE_PARENT, SPEAR1340_PERIP1_CLK_ENB, |
632 | &_lock); | 632 | SPEAR1340_SDHCI_CLK_ENB, 0, &_lock); |
633 | clk_register_clkdev(clk, NULL, "b3000000.sdhci"); | 633 | clk_register_clkdev(clk, NULL, "b3000000.sdhci"); |
634 | 634 | ||
635 | clk = clk_register_aux("cfxd_syn_clk", "cfxd_syn_gclk", "vco1div2_clk", | 635 | clk = clk_register_aux("cfxd_syn_clk", "cfxd_syn_gclk", "vco1div2_clk", |
@@ -638,9 +638,9 @@ void __init spear1340_clk_init(void) | |||
638 | clk_register_clkdev(clk, "cfxd_syn_clk", NULL); | 638 | clk_register_clkdev(clk, "cfxd_syn_clk", NULL); |
639 | clk_register_clkdev(clk1, "cfxd_syn_gclk", NULL); | 639 | clk_register_clkdev(clk1, "cfxd_syn_gclk", NULL); |
640 | 640 | ||
641 | clk = clk_register_gate(NULL, "cfxd_clk", "cfxd_syn_gclk", 0, | 641 | clk = clk_register_gate(NULL, "cfxd_clk", "cfxd_syn_gclk", |
642 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_CFXD_CLK_ENB, 0, | 642 | CLK_SET_RATE_PARENT, SPEAR1340_PERIP1_CLK_ENB, |
643 | &_lock); | 643 | SPEAR1340_CFXD_CLK_ENB, 0, &_lock); |
644 | clk_register_clkdev(clk, NULL, "b2800000.cf"); | 644 | clk_register_clkdev(clk, NULL, "b2800000.cf"); |
645 | clk_register_clkdev(clk, NULL, "arasan_xd"); | 645 | clk_register_clkdev(clk, NULL, "arasan_xd"); |
646 | 646 | ||
@@ -651,12 +651,12 @@ void __init spear1340_clk_init(void) | |||
651 | clk_register_clkdev(clk1, "c3_syn_gclk", NULL); | 651 | clk_register_clkdev(clk1, "c3_syn_gclk", NULL); |
652 | 652 | ||
653 | clk = clk_register_mux(NULL, "c3_mclk", c3_parents, | 653 | clk = clk_register_mux(NULL, "c3_mclk", c3_parents, |
654 | ARRAY_SIZE(c3_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 654 | ARRAY_SIZE(c3_parents), CLK_SET_RATE_PARENT, |
655 | SPEAR1340_C3_CLK_SHIFT, SPEAR1340_C3_CLK_MASK, 0, | 655 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_C3_CLK_SHIFT, |
656 | &_lock); | 656 | SPEAR1340_C3_CLK_MASK, 0, &_lock); |
657 | clk_register_clkdev(clk, "c3_mclk", NULL); | 657 | clk_register_clkdev(clk, "c3_mclk", NULL); |
658 | 658 | ||
659 | clk = clk_register_gate(NULL, "c3_clk", "c3_mclk", 0, | 659 | clk = clk_register_gate(NULL, "c3_clk", "c3_mclk", CLK_SET_RATE_PARENT, |
660 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_C3_CLK_ENB, 0, | 660 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_C3_CLK_ENB, 0, |
661 | &_lock); | 661 | &_lock); |
662 | clk_register_clkdev(clk, NULL, "e1800000.c3"); | 662 | clk_register_clkdev(clk, NULL, "e1800000.c3"); |
@@ -694,7 +694,7 @@ void __init spear1340_clk_init(void) | |||
694 | clk_register_clkdev(clk, "clcd_syn_clk", NULL); | 694 | clk_register_clkdev(clk, "clcd_syn_clk", NULL); |
695 | 695 | ||
696 | clk = clk_register_mux(NULL, "clcd_pixel_mclk", clcd_pixel_parents, | 696 | clk = clk_register_mux(NULL, "clcd_pixel_mclk", clcd_pixel_parents, |
697 | ARRAY_SIZE(clcd_pixel_parents), 0, | 697 | ARRAY_SIZE(clcd_pixel_parents), CLK_SET_RATE_PARENT, |
698 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_CLCD_CLK_SHIFT, | 698 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_CLCD_CLK_SHIFT, |
699 | SPEAR1340_CLCD_CLK_MASK, 0, &_lock); | 699 | SPEAR1340_CLCD_CLK_MASK, 0, &_lock); |
700 | clk_register_clkdev(clk, "clcd_pixel_mclk", NULL); | 700 | clk_register_clkdev(clk, "clcd_pixel_mclk", NULL); |
@@ -711,15 +711,16 @@ void __init spear1340_clk_init(void) | |||
711 | 0, &_lock); | 711 | 0, &_lock); |
712 | clk_register_clkdev(clk, "i2s_src_mclk", NULL); | 712 | clk_register_clkdev(clk, "i2s_src_mclk", NULL); |
713 | 713 | ||
714 | clk = clk_register_aux("i2s_prs1_clk", NULL, "i2s_src_mclk", 0, | 714 | clk = clk_register_aux("i2s_prs1_clk", NULL, "i2s_src_mclk", |
715 | SPEAR1340_I2S_CLK_CFG, &i2s_prs1_masks, i2s_prs1_rtbl, | 715 | CLK_SET_RATE_PARENT, SPEAR1340_I2S_CLK_CFG, |
716 | &i2s_prs1_masks, i2s_prs1_rtbl, | ||
716 | ARRAY_SIZE(i2s_prs1_rtbl), &_lock, NULL); | 717 | ARRAY_SIZE(i2s_prs1_rtbl), &_lock, NULL); |
717 | clk_register_clkdev(clk, "i2s_prs1_clk", NULL); | 718 | clk_register_clkdev(clk, "i2s_prs1_clk", NULL); |
718 | 719 | ||
719 | clk = clk_register_mux(NULL, "i2s_ref_mclk", i2s_ref_parents, | 720 | clk = clk_register_mux(NULL, "i2s_ref_mclk", i2s_ref_parents, |
720 | ARRAY_SIZE(i2s_ref_parents), 0, SPEAR1340_I2S_CLK_CFG, | 721 | ARRAY_SIZE(i2s_ref_parents), CLK_SET_RATE_PARENT, |
721 | SPEAR1340_I2S_REF_SHIFT, SPEAR1340_I2S_REF_SEL_MASK, 0, | 722 | SPEAR1340_I2S_CLK_CFG, SPEAR1340_I2S_REF_SHIFT, |
722 | &_lock); | 723 | SPEAR1340_I2S_REF_SEL_MASK, 0, &_lock); |
723 | clk_register_clkdev(clk, "i2s_ref_mclk", NULL); | 724 | clk_register_clkdev(clk, "i2s_ref_mclk", NULL); |
724 | 725 | ||
725 | clk = clk_register_gate(NULL, "i2s_ref_pad_clk", "i2s_ref_mclk", 0, | 726 | clk = clk_register_gate(NULL, "i2s_ref_pad_clk", "i2s_ref_mclk", 0, |
@@ -805,9 +806,9 @@ void __init spear1340_clk_init(void) | |||
805 | clk_register_clkdev(clk, "adc_syn_clk", NULL); | 806 | clk_register_clkdev(clk, "adc_syn_clk", NULL); |
806 | clk_register_clkdev(clk1, "adc_syn_gclk", NULL); | 807 | clk_register_clkdev(clk1, "adc_syn_gclk", NULL); |
807 | 808 | ||
808 | clk = clk_register_gate(NULL, "adc_clk", "adc_syn_gclk", 0, | 809 | clk = clk_register_gate(NULL, "adc_clk", "adc_syn_gclk", |
809 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_ADC_CLK_ENB, 0, | 810 | CLK_SET_RATE_PARENT, SPEAR1340_PERIP1_CLK_ENB, |
810 | &_lock); | 811 | SPEAR1340_ADC_CLK_ENB, 0, &_lock); |
811 | clk_register_clkdev(clk, NULL, "e0080000.adc"); | 812 | clk_register_clkdev(clk, NULL, "e0080000.adc"); |
812 | 813 | ||
813 | /* clock derived from apb clk */ | 814 | /* clock derived from apb clk */ |
@@ -874,9 +875,9 @@ void __init spear1340_clk_init(void) | |||
874 | &_lock); | 875 | &_lock); |
875 | clk_register_clkdev(clk, "gen_syn3_clk", NULL); | 876 | clk_register_clkdev(clk, "gen_syn3_clk", NULL); |
876 | 877 | ||
877 | clk = clk_register_gate(NULL, "mali_clk", "gen_syn3_clk", 0, | 878 | clk = clk_register_gate(NULL, "mali_clk", "gen_syn3_clk", |
878 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_MALI_CLK_ENB, 0, | 879 | CLK_SET_RATE_PARENT, SPEAR1340_PERIP3_CLK_ENB, |
879 | &_lock); | 880 | SPEAR1340_MALI_CLK_ENB, 0, &_lock); |
880 | clk_register_clkdev(clk, NULL, "mali"); | 881 | clk_register_clkdev(clk, NULL, "mali"); |
881 | 882 | ||
882 | clk = clk_register_gate(NULL, "cec0_clk", "ahb_clk", 0, | 883 | clk = clk_register_gate(NULL, "cec0_clk", "ahb_clk", 0, |
@@ -890,25 +891,25 @@ void __init spear1340_clk_init(void) | |||
890 | clk_register_clkdev(clk, NULL, "spear_cec.1"); | 891 | clk_register_clkdev(clk, NULL, "spear_cec.1"); |
891 | 892 | ||
892 | clk = clk_register_mux(NULL, "spdif_out_mclk", spdif_out_parents, | 893 | clk = clk_register_mux(NULL, "spdif_out_mclk", spdif_out_parents, |
893 | ARRAY_SIZE(spdif_out_parents), 0, | 894 | ARRAY_SIZE(spdif_out_parents), CLK_SET_RATE_PARENT, |
894 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_OUT_CLK_SHIFT, | 895 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_OUT_CLK_SHIFT, |
895 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); | 896 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); |
896 | clk_register_clkdev(clk, "spdif_out_mclk", NULL); | 897 | clk_register_clkdev(clk, "spdif_out_mclk", NULL); |
897 | 898 | ||
898 | clk = clk_register_gate(NULL, "spdif_out_clk", "spdif_out_mclk", 0, | 899 | clk = clk_register_gate(NULL, "spdif_out_clk", "spdif_out_mclk", |
899 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_SPDIF_OUT_CLK_ENB, | 900 | CLK_SET_RATE_PARENT, SPEAR1340_PERIP3_CLK_ENB, |
900 | 0, &_lock); | 901 | SPEAR1340_SPDIF_OUT_CLK_ENB, 0, &_lock); |
901 | clk_register_clkdev(clk, NULL, "d0000000.spdif-out"); | 902 | clk_register_clkdev(clk, NULL, "d0000000.spdif-out"); |
902 | 903 | ||
903 | clk = clk_register_mux(NULL, "spdif_in_mclk", spdif_in_parents, | 904 | clk = clk_register_mux(NULL, "spdif_in_mclk", spdif_in_parents, |
904 | ARRAY_SIZE(spdif_in_parents), 0, | 905 | ARRAY_SIZE(spdif_in_parents), CLK_SET_RATE_PARENT, |
905 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_IN_CLK_SHIFT, | 906 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_IN_CLK_SHIFT, |
906 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); | 907 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); |
907 | clk_register_clkdev(clk, "spdif_in_mclk", NULL); | 908 | clk_register_clkdev(clk, "spdif_in_mclk", NULL); |
908 | 909 | ||
909 | clk = clk_register_gate(NULL, "spdif_in_clk", "spdif_in_mclk", 0, | 910 | clk = clk_register_gate(NULL, "spdif_in_clk", "spdif_in_mclk", |
910 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_SPDIF_IN_CLK_ENB, 0, | 911 | CLK_SET_RATE_PARENT, SPEAR1340_PERIP3_CLK_ENB, |
911 | &_lock); | 912 | SPEAR1340_SPDIF_IN_CLK_ENB, 0, &_lock); |
912 | clk_register_clkdev(clk, NULL, "d0100000.spdif-in"); | 913 | clk_register_clkdev(clk, NULL, "d0100000.spdif-in"); |
913 | 914 | ||
914 | clk = clk_register_gate(NULL, "acp_clk", "acp_mclk", 0, | 915 | clk = clk_register_gate(NULL, "acp_clk", "acp_mclk", 0, |