diff options
author | Shaik Ameer Basha <shaik.ameer@samsung.com> | 2014-05-08 07:27:59 -0400 |
---|---|---|
committer | Tomasz Figa <t.figa@samsung.com> | 2014-05-14 13:40:21 -0400 |
commit | 6b5ae463e472ba2145766066e6e2d465a07074a5 (patch) | |
tree | 53b104b509bfc242d51b977ff4a979ddc4137660 /drivers/clk | |
parent | 6575fa76c394d6f6c0ed3f35475324c8846984af (diff) |
clk: samsung: exynos5420: update clocks for FSYS and FSYS2 blocks
This patch adds more clocks from FSYS and FSYS2 blocks
and uses GATE_IP_* registers for gating IPs.
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/samsung/clk-exynos5420.c | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index a6c87d35c46d..980a3f2dd419 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c | |||
@@ -85,6 +85,7 @@ | |||
85 | #define GATE_BUS_TOP 0x10700 | 85 | #define GATE_BUS_TOP 0x10700 |
86 | #define GATE_BUS_GEN 0x1073c | 86 | #define GATE_BUS_GEN 0x1073c |
87 | #define GATE_BUS_FSYS0 0x10740 | 87 | #define GATE_BUS_FSYS0 0x10740 |
88 | #define GATE_BUS_FSYS2 0x10748 | ||
88 | #define GATE_BUS_PERIC 0x10750 | 89 | #define GATE_BUS_PERIC 0x10750 |
89 | #define GATE_BUS_PERIC1 0x10754 | 90 | #define GATE_BUS_PERIC1 0x10754 |
90 | #define GATE_BUS_PERIS0 0x10760 | 91 | #define GATE_BUS_PERIS0 0x10760 |
@@ -97,6 +98,7 @@ | |||
97 | #define GATE_IP_DISP1 0x10928 | 98 | #define GATE_IP_DISP1 0x10928 |
98 | #define GATE_IP_G3D 0x10930 | 99 | #define GATE_IP_G3D 0x10930 |
99 | #define GATE_IP_GEN 0x10934 | 100 | #define GATE_IP_GEN 0x10934 |
101 | #define GATE_IP_FSYS 0x10944 | ||
100 | #define GATE_IP_PERIC 0x10950 | 102 | #define GATE_IP_PERIC 0x10950 |
101 | #define GATE_IP_PERIS 0x10960 | 103 | #define GATE_IP_PERIS 0x10960 |
102 | #define GATE_IP_MSCL 0x10970 | 104 | #define GATE_IP_MSCL 0x10970 |
@@ -177,6 +179,7 @@ static unsigned long exynos5420_clk_regs[] __initdata = { | |||
177 | GATE_BUS_TOP, | 179 | GATE_BUS_TOP, |
178 | GATE_BUS_GEN, | 180 | GATE_BUS_GEN, |
179 | GATE_BUS_FSYS0, | 181 | GATE_BUS_FSYS0, |
182 | GATE_BUS_FSYS2, | ||
180 | GATE_BUS_PERIC, | 183 | GATE_BUS_PERIC, |
181 | GATE_BUS_PERIC1, | 184 | GATE_BUS_PERIC1, |
182 | GATE_BUS_PERIS0, | 185 | GATE_BUS_PERIS0, |
@@ -189,6 +192,7 @@ static unsigned long exynos5420_clk_regs[] __initdata = { | |||
189 | GATE_IP_DISP1, | 192 | GATE_IP_DISP1, |
190 | GATE_IP_G3D, | 193 | GATE_IP_G3D, |
191 | GATE_IP_GEN, | 194 | GATE_IP_GEN, |
195 | GATE_IP_FSYS, | ||
192 | GATE_IP_PERIC, | 196 | GATE_IP_PERIC, |
193 | GATE_IP_PERIS, | 197 | GATE_IP_PERIS, |
194 | GATE_IP_MSCL, | 198 | GATE_IP_MSCL, |
@@ -269,6 +273,8 @@ PNAME(mout_sw_aclk66_p) = {"dout_aclk66", "mout_sclk_spll"}; | |||
269 | PNAME(mout_user_aclk66_peric_p) = { "fin_pll", "mout_sw_aclk66" }; | 273 | PNAME(mout_user_aclk66_peric_p) = { "fin_pll", "mout_sw_aclk66" }; |
270 | 274 | ||
271 | PNAME(mout_sw_aclk200_fsys_p) = {"dout_aclk200_fsys", "mout_sclk_spll"}; | 275 | PNAME(mout_sw_aclk200_fsys_p) = {"dout_aclk200_fsys", "mout_sclk_spll"}; |
276 | PNAME(mout_sw_pclk200_fsys_p) = {"dout_pclk200_fsys", "mout_sclk_spll"}; | ||
277 | PNAME(mout_user_pclk200_fsys_p) = {"fin_pll", "mout_sw_pclk200_fsys"}; | ||
272 | PNAME(mout_user_aclk200_fsys_p) = {"fin_pll", "mout_sw_aclk200_fsys"}; | 278 | PNAME(mout_user_aclk200_fsys_p) = {"fin_pll", "mout_sw_aclk200_fsys"}; |
273 | 279 | ||
274 | PNAME(mout_sw_aclk200_fsys2_p) = {"dout_aclk200_fsys2", "mout_sclk_spll"}; | 280 | PNAME(mout_sw_aclk200_fsys2_p) = {"dout_aclk200_fsys2", "mout_sclk_spll"}; |
@@ -381,6 +387,7 @@ static struct samsung_mux_clock exynos5420_mux_clks[] __initdata = { | |||
381 | MUX(0, "mout_aclk200_fsys2", mout_group1_p, SRC_TOP0, 12, 2), | 387 | MUX(0, "mout_aclk200_fsys2", mout_group1_p, SRC_TOP0, 12, 2), |
382 | MUX(0, "mout_aclk400_wcore", mout_group1_p, SRC_TOP0, 16, 2), | 388 | MUX(0, "mout_aclk400_wcore", mout_group1_p, SRC_TOP0, 16, 2), |
383 | MUX(0, "mout_aclk100_noc", mout_group1_p, SRC_TOP0, 20, 2), | 389 | MUX(0, "mout_aclk100_noc", mout_group1_p, SRC_TOP0, 20, 2), |
390 | MUX(0, "mout_pclk200_fsys", mout_group1_p, SRC_TOP0, 24, 2), | ||
384 | MUX(0, "mout_aclk200_fsys", mout_group1_p, SRC_TOP0, 28, 2), | 391 | MUX(0, "mout_aclk200_fsys", mout_group1_p, SRC_TOP0, 28, 2), |
385 | 392 | ||
386 | MUX(0, "mout_aclk333_432_gscl", mout_group4_p, SRC_TOP1, 0, 2), | 393 | MUX(0, "mout_aclk333_432_gscl", mout_group4_p, SRC_TOP1, 0, 2), |
@@ -412,6 +419,8 @@ static struct samsung_mux_clock exynos5420_mux_clks[] __initdata = { | |||
412 | SRC_TOP3, 16, 1), | 419 | SRC_TOP3, 16, 1), |
413 | MUX(0, "mout_user_aclk100_noc", mout_user_aclk100_noc_p, | 420 | MUX(0, "mout_user_aclk100_noc", mout_user_aclk100_noc_p, |
414 | SRC_TOP3, 20, 1), | 421 | SRC_TOP3, 20, 1), |
422 | MUX(0, "mout_user_pclk200_fsys", mout_user_pclk200_fsys_p, | ||
423 | SRC_TOP3, 24, 1), | ||
415 | MUX(0, "mout_user_aclk200_fsys", mout_user_aclk200_fsys_p, | 424 | MUX(0, "mout_user_aclk200_fsys", mout_user_aclk200_fsys_p, |
416 | SRC_TOP3, 28, 1), | 425 | SRC_TOP3, 28, 1), |
417 | 426 | ||
@@ -466,6 +475,8 @@ static struct samsung_mux_clock exynos5420_mux_clks[] __initdata = { | |||
466 | SRC_TOP10, 16, 1), | 475 | SRC_TOP10, 16, 1), |
467 | MUX(0, "mout_sw_aclk100_noc", mout_sw_aclk100_noc_p, | 476 | MUX(0, "mout_sw_aclk100_noc", mout_sw_aclk100_noc_p, |
468 | SRC_TOP10, 20, 1), | 477 | SRC_TOP10, 20, 1), |
478 | MUX(0, "mout_sw_pclk200_fsys", mout_sw_pclk200_fsys_p, | ||
479 | SRC_TOP10, 24, 1), | ||
469 | MUX(0, "mout_sw_aclk200_fsys", mout_sw_aclk200_fsys_p, | 480 | MUX(0, "mout_sw_aclk200_fsys", mout_sw_aclk200_fsys_p, |
470 | SRC_TOP10, 28, 1), | 481 | SRC_TOP10, 28, 1), |
471 | 482 | ||
@@ -516,6 +527,7 @@ static struct samsung_mux_clock exynos5420_mux_clks[] __initdata = { | |||
516 | MUX(0, "mout_mmc2", mout_group2_p, SRC_FSYS, 16, 3), | 527 | MUX(0, "mout_mmc2", mout_group2_p, SRC_FSYS, 16, 3), |
517 | MUX(0, "mout_usbd300", mout_group2_p, SRC_FSYS, 20, 3), | 528 | MUX(0, "mout_usbd300", mout_group2_p, SRC_FSYS, 20, 3), |
518 | MUX(0, "mout_unipro", mout_group2_p, SRC_FSYS, 24, 3), | 529 | MUX(0, "mout_unipro", mout_group2_p, SRC_FSYS, 24, 3), |
530 | MUX(0, "mout_mphy_refclk", mout_group2_p, SRC_FSYS, 28, 3), | ||
519 | 531 | ||
520 | /* PERIC Block */ | 532 | /* PERIC Block */ |
521 | MUX(0, "mout_uart0", mout_group2_p, SRC_PERIC0, 4, 3), | 533 | MUX(0, "mout_uart0", mout_group2_p, SRC_PERIC0, 4, 3), |
@@ -598,6 +610,7 @@ static struct samsung_div_clock exynos5420_div_clks[] __initdata = { | |||
598 | DIV(0, "dout_mmc2", "mout_mmc2", DIV_FSYS1, 20, 10), | 610 | DIV(0, "dout_mmc2", "mout_mmc2", DIV_FSYS1, 20, 10), |
599 | 611 | ||
600 | DIV(0, "dout_unipro", "mout_unipro", DIV_FSYS2, 24, 8), | 612 | DIV(0, "dout_unipro", "mout_unipro", DIV_FSYS2, 24, 8), |
613 | DIV(0, "dout_mphy_refclk", "mout_mphy_refclk", DIV_FSYS2, 16, 8), | ||
601 | 614 | ||
602 | /* UART and PWM */ | 615 | /* UART and PWM */ |
603 | DIV(0, "dout_uart0", "mout_uart0", DIV_PERIC0, 8, 4), | 616 | DIV(0, "dout_uart0", "mout_uart0", DIV_PERIC0, 8, 4), |
@@ -745,9 +758,6 @@ static struct samsung_gate_clock exynos5420_gate_clks[] __initdata = { | |||
745 | GATE(CLK_SCLK_USBD301, "sclk_usbd301", "dout_usbd301", | 758 | GATE(CLK_SCLK_USBD301, "sclk_usbd301", "dout_usbd301", |
746 | GATE_TOP_SCLK_FSYS, 10, CLK_SET_RATE_PARENT, 0), | 759 | GATE_TOP_SCLK_FSYS, 10, CLK_SET_RATE_PARENT, 0), |
747 | 760 | ||
748 | GATE(CLK_SCLK_USBD301, "sclk_unipro", "dout_unipro", | ||
749 | SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), | ||
750 | |||
751 | /* Display */ | 761 | /* Display */ |
752 | GATE(CLK_SCLK_FIMD1, "sclk_fimd1", "dout_fimd1", | 762 | GATE(CLK_SCLK_FIMD1, "sclk_fimd1", "dout_fimd1", |
753 | GATE_TOP_SCLK_DISP1, 0, CLK_SET_RATE_PARENT, 0), | 763 | GATE_TOP_SCLK_DISP1, 0, CLK_SET_RATE_PARENT, 0), |
@@ -765,20 +775,23 @@ static struct samsung_gate_clock exynos5420_gate_clks[] __initdata = { | |||
765 | GATE_TOP_SCLK_MAU, 0, CLK_SET_RATE_PARENT, 0), | 775 | GATE_TOP_SCLK_MAU, 0, CLK_SET_RATE_PARENT, 0), |
766 | GATE(CLK_SCLK_MAUPCM0, "sclk_maupcm0", "dout_maupcm0", | 776 | GATE(CLK_SCLK_MAUPCM0, "sclk_maupcm0", "dout_maupcm0", |
767 | GATE_TOP_SCLK_MAU, 1, CLK_SET_RATE_PARENT, 0), | 777 | GATE_TOP_SCLK_MAU, 1, CLK_SET_RATE_PARENT, 0), |
768 | /* FSYS */ | 778 | |
779 | /* FSYS Block */ | ||
769 | GATE(CLK_TSI, "tsi", "aclk200_fsys", GATE_BUS_FSYS0, 0, 0, 0), | 780 | GATE(CLK_TSI, "tsi", "aclk200_fsys", GATE_BUS_FSYS0, 0, 0, 0), |
770 | GATE(CLK_PDMA0, "pdma0", "aclk200_fsys", GATE_BUS_FSYS0, 1, 0, 0), | 781 | GATE(CLK_PDMA0, "pdma0", "aclk200_fsys", GATE_BUS_FSYS0, 1, 0, 0), |
771 | GATE(CLK_PDMA1, "pdma1", "aclk200_fsys", GATE_BUS_FSYS0, 2, 0, 0), | 782 | GATE(CLK_PDMA1, "pdma1", "aclk200_fsys", GATE_BUS_FSYS0, 2, 0, 0), |
772 | GATE(CLK_UFS, "ufs", "aclk200_fsys2", GATE_BUS_FSYS0, 3, 0, 0), | 783 | GATE(CLK_UFS, "ufs", "aclk200_fsys2", GATE_BUS_FSYS0, 3, 0, 0), |
773 | GATE(CLK_RTIC, "rtic", "aclk200_fsys", GATE_BUS_FSYS0, 5, 0, 0), | 784 | GATE(CLK_RTIC, "rtic", "aclk200_fsys", GATE_IP_FSYS, 9, 0, 0), |
774 | GATE(CLK_MMC0, "mmc0", "aclk200_fsys2", GATE_BUS_FSYS0, 12, 0, 0), | 785 | GATE(CLK_MMC0, "mmc0", "aclk200_fsys2", GATE_IP_FSYS, 12, 0, 0), |
775 | GATE(CLK_MMC1, "mmc1", "aclk200_fsys2", GATE_BUS_FSYS0, 13, 0, 0), | 786 | GATE(CLK_MMC1, "mmc1", "aclk200_fsys2", GATE_IP_FSYS, 13, 0, 0), |
776 | GATE(CLK_MMC2, "mmc2", "aclk200_fsys2", GATE_BUS_FSYS0, 14, 0, 0), | 787 | GATE(CLK_MMC2, "mmc2", "aclk200_fsys2", GATE_IP_FSYS, 14, 0, 0), |
777 | GATE(CLK_SROMC, "sromc", "aclk200_fsys2", | 788 | GATE(CLK_SROMC, "sromc", "aclk200_fsys2", |
778 | GATE_BUS_FSYS0, 19, CLK_IGNORE_UNUSED, 0), | 789 | GATE_IP_FSYS, 17, CLK_IGNORE_UNUSED, 0), |
779 | GATE(CLK_USBH20, "usbh20", "aclk200_fsys", GATE_BUS_FSYS0, 20, 0, 0), | 790 | GATE(CLK_USBH20, "usbh20", "aclk200_fsys", GATE_IP_FSYS, 18, 0, 0), |
780 | GATE(CLK_USBD300, "usbd300", "aclk200_fsys", GATE_BUS_FSYS0, 21, 0, 0), | 791 | GATE(CLK_USBD300, "usbd300", "aclk200_fsys", GATE_IP_FSYS, 19, 0, 0), |
781 | GATE(CLK_USBD301, "usbd301", "aclk200_fsys", GATE_BUS_FSYS0, 28, 0, 0), | 792 | GATE(CLK_USBD301, "usbd301", "aclk200_fsys", GATE_IP_FSYS, 20, 0, 0), |
793 | GATE(CLK_SCLK_UNIPRO, "sclk_unipro", "dout_unipro", | ||
794 | SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), | ||
782 | 795 | ||
783 | /* PERIC Block */ | 796 | /* PERIC Block */ |
784 | GATE(CLK_UART0, "uart0", "aclk66_peric", GATE_IP_PERIC, 0, 0, 0), | 797 | GATE(CLK_UART0, "uart0", "aclk66_peric", GATE_IP_PERIC, 0, 0, 0), |