aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2017-07-21 10:21:02 -0400
committerSylwester Nawrocki <s.nawrocki@samsung.com>2017-08-10 04:56:23 -0400
commit599cebea93e69c25e4cf027fc21d2bdf9a4a1ec7 (patch)
tree22b34a0acd55ecc4cf753ef65246c35653d6a989
parent7df45a532c5ee3efe106e8a9042a3524b0b587b1 (diff)
clk: samsung: exynos542x: Enable clock rate propagation up to the EPLL
The CLK_SET_RATE_PARENT flag is added to clocks between the EPLL and the audio subsystem clock controller so that the EPLL's output frequency can be set indirectly with clk_set_rate() on a leaf clock. That should be safe as EPLL is normally only used to generate clock for the audio subsystem. With this change we can avoid passing the EPLL clock to the ASoC machine driver. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
-rw-r--r--drivers/clk/samsung/clk-exynos5420.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 5f1180972226..699f499007d8 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -537,8 +537,8 @@ static const struct samsung_mux_clock exynos5800_mux_clks[] __initconst = {
537 537
538 MUX(CLK_MOUT_MX_MSPLL_CCORE, "mout_mx_mspll_ccore", 538 MUX(CLK_MOUT_MX_MSPLL_CCORE, "mout_mx_mspll_ccore",
539 mout_mx_mspll_ccore_p, SRC_TOP7, 16, 2), 539 mout_mx_mspll_ccore_p, SRC_TOP7, 16, 2),
540 MUX(CLK_MOUT_MAU_EPLL, "mout_mau_epll_clk", mout_mau_epll_clk_5800_p, 540 MUX_F(CLK_MOUT_MAU_EPLL, "mout_mau_epll_clk", mout_mau_epll_clk_5800_p,
541 SRC_TOP7, 20, 2), 541 SRC_TOP7, 20, 2, CLK_SET_RATE_PARENT, 0),
542 MUX(0, "sclk_bpll", mout_bpll_p, SRC_TOP7, 24, 1), 542 MUX(0, "sclk_bpll", mout_bpll_p, SRC_TOP7, 24, 1),
543 MUX(0, "mout_epll2", mout_epll2_5800_p, SRC_TOP7, 28, 1), 543 MUX(0, "mout_epll2", mout_epll2_5800_p, SRC_TOP7, 28, 1),
544 544
@@ -547,8 +547,8 @@ static const struct samsung_mux_clock exynos5800_mux_clks[] __initconst = {
547 MUX(0, "mout_aclk432_cam", mout_group6_5800_p, SRC_TOP8, 24, 2), 547 MUX(0, "mout_aclk432_cam", mout_group6_5800_p, SRC_TOP8, 24, 2),
548 MUX(0, "mout_aclk432_scaler", mout_group6_5800_p, SRC_TOP8, 28, 2), 548 MUX(0, "mout_aclk432_scaler", mout_group6_5800_p, SRC_TOP8, 28, 2),
549 549
550 MUX(CLK_MOUT_USER_MAU_EPLL, "mout_user_mau_epll", mout_group16_5800_p, 550 MUX_F(CLK_MOUT_USER_MAU_EPLL, "mout_user_mau_epll", mout_group16_5800_p,
551 SRC_TOP9, 8, 1), 551 SRC_TOP9, 8, 1, CLK_SET_RATE_PARENT, 0),
552 MUX(0, "mout_user_aclk550_cam", mout_group15_5800_p, 552 MUX(0, "mout_user_aclk550_cam", mout_group15_5800_p,
553 SRC_TOP9, 16, 1), 553 SRC_TOP9, 16, 1),
554 MUX(0, "mout_user_aclkfl1_550_cam", mout_group13_5800_p, 554 MUX(0, "mout_user_aclkfl1_550_cam", mout_group13_5800_p,
@@ -591,7 +591,7 @@ static const struct samsung_gate_clock exynos5800_gate_clks[] __initconst = {
591 GATE(CLK_ACLK432_SCALER, "aclk432_scaler", "mout_user_aclk432_scaler", 591 GATE(CLK_ACLK432_SCALER, "aclk432_scaler", "mout_user_aclk432_scaler",
592 GATE_BUS_TOP, 27, CLK_IS_CRITICAL, 0), 592 GATE_BUS_TOP, 27, CLK_IS_CRITICAL, 0),
593 GATE(CLK_MAU_EPLL, "mau_epll", "mout_user_mau_epll", 593 GATE(CLK_MAU_EPLL, "mau_epll", "mout_user_mau_epll",
594 SRC_MASK_TOP7, 20, 0, 0), 594 SRC_MASK_TOP7, 20, CLK_SET_RATE_PARENT, 0),
595}; 595};
596 596
597static const struct samsung_mux_clock exynos5420_mux_clks[] __initconst = { 597static const struct samsung_mux_clock exynos5420_mux_clks[] __initconst = {
@@ -633,7 +633,7 @@ static const struct samsung_div_clock exynos5420_div_clks[] __initconst = {
633 633
634static const struct samsung_gate_clock exynos5420_gate_clks[] __initconst = { 634static const struct samsung_gate_clock exynos5420_gate_clks[] __initconst = {
635 GATE(CLK_MAU_EPLL, "mau_epll", "mout_mau_epll_clk", 635 GATE(CLK_MAU_EPLL, "mau_epll", "mout_mau_epll_clk",
636 SRC_MASK_TOP7, 20, 0, 0), 636 SRC_MASK_TOP7, 20, CLK_SET_RATE_PARENT, 0),
637}; 637};
638 638
639static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = { 639static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
@@ -713,7 +713,8 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
713 MUX(0, "mout_sclk_spll", mout_spll_p, SRC_TOP6, 8, 1), 713 MUX(0, "mout_sclk_spll", mout_spll_p, SRC_TOP6, 8, 1),
714 MUX(0, "mout_sclk_ipll", mout_ipll_p, SRC_TOP6, 12, 1), 714 MUX(0, "mout_sclk_ipll", mout_ipll_p, SRC_TOP6, 12, 1),
715 MUX(0, "mout_sclk_rpll", mout_rpll_p, SRC_TOP6, 16, 1), 715 MUX(0, "mout_sclk_rpll", mout_rpll_p, SRC_TOP6, 16, 1),
716 MUX(CLK_MOUT_EPLL, "mout_sclk_epll", mout_epll_p, SRC_TOP6, 20, 1), 716 MUX_F(CLK_MOUT_EPLL, "mout_sclk_epll", mout_epll_p, SRC_TOP6, 20, 1,
717 CLK_SET_RATE_PARENT, 0),
717 MUX(0, "mout_sclk_dpll", mout_dpll_p, SRC_TOP6, 24, 1), 718 MUX(0, "mout_sclk_dpll", mout_dpll_p, SRC_TOP6, 24, 1),
718 MUX(0, "mout_sclk_cpll", mout_cpll_p, SRC_TOP6, 28, 1), 719 MUX(0, "mout_sclk_cpll", mout_cpll_p, SRC_TOP6, 28, 1),
719 720