diff options
author | Jernej Skrabec <jernej.skrabec@siol.net> | 2018-06-25 08:02:42 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-06-27 13:06:41 -0400 |
commit | fb4aa0f64380d94bf10b5da63a6760962d824dbc (patch) | |
tree | 29eb42a1b9f31a96c5204c690cab70a46ed3290c | |
parent | 24a95f7578f517e78367d6fb61aba238497a046b (diff) |
clk: sunxi-ng: r40: Allow setting parent rate to display related clocks
Display related peripherals need precise clocks to operate correctly.
Allow DE2, TCONs and HDMI to set parent clock.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
-rw-r--r-- | drivers/clk/sunxi-ng/ccu-sun8i-r40.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r40.c b/drivers/clk/sunxi-ng/ccu-sun8i-r40.c index d52af1785644..0f388f6944d5 100644 --- a/drivers/clk/sunxi-ng/ccu-sun8i-r40.c +++ b/drivers/clk/sunxi-ng/ccu-sun8i-r40.c | |||
@@ -656,7 +656,8 @@ static SUNXI_CCU_GATE(dram_deinterlace_clk, "dram-deinterlace", "dram", | |||
656 | 656 | ||
657 | static const char * const de_parents[] = { "pll-periph0-2x", "pll-de" }; | 657 | static const char * const de_parents[] = { "pll-periph0-2x", "pll-de" }; |
658 | static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents, | 658 | static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents, |
659 | 0x104, 0, 4, 24, 3, BIT(31), 0); | 659 | 0x104, 0, 4, 24, 3, BIT(31), |
660 | CLK_SET_RATE_PARENT); | ||
660 | static SUNXI_CCU_M_WITH_MUX_GATE(mp_clk, "mp", de_parents, | 661 | static SUNXI_CCU_M_WITH_MUX_GATE(mp_clk, "mp", de_parents, |
661 | 0x108, 0, 4, 24, 3, BIT(31), 0); | 662 | 0x108, 0, 4, 24, 3, BIT(31), 0); |
662 | 663 | ||
@@ -668,9 +669,11 @@ static SUNXI_CCU_MUX_WITH_GATE(tcon_lcd0_clk, "tcon-lcd0", tcon_parents, | |||
668 | static SUNXI_CCU_MUX_WITH_GATE(tcon_lcd1_clk, "tcon-lcd1", tcon_parents, | 669 | static SUNXI_CCU_MUX_WITH_GATE(tcon_lcd1_clk, "tcon-lcd1", tcon_parents, |
669 | 0x114, 24, 3, BIT(31), CLK_SET_RATE_PARENT); | 670 | 0x114, 24, 3, BIT(31), CLK_SET_RATE_PARENT); |
670 | static SUNXI_CCU_M_WITH_MUX_GATE(tcon_tv0_clk, "tcon-tv0", tcon_parents, | 671 | static SUNXI_CCU_M_WITH_MUX_GATE(tcon_tv0_clk, "tcon-tv0", tcon_parents, |
671 | 0x118, 0, 4, 24, 3, BIT(31), 0); | 672 | 0x118, 0, 4, 24, 3, BIT(31), |
673 | CLK_SET_RATE_PARENT); | ||
672 | static SUNXI_CCU_M_WITH_MUX_GATE(tcon_tv1_clk, "tcon-tv1", tcon_parents, | 674 | static SUNXI_CCU_M_WITH_MUX_GATE(tcon_tv1_clk, "tcon-tv1", tcon_parents, |
673 | 0x11c, 0, 4, 24, 3, BIT(31), 0); | 675 | 0x11c, 0, 4, 24, 3, BIT(31), |
676 | CLK_SET_RATE_PARENT); | ||
674 | 677 | ||
675 | static const char * const deinterlace_parents[] = { "pll-periph0", | 678 | static const char * const deinterlace_parents[] = { "pll-periph0", |
676 | "pll-periph1" }; | 679 | "pll-periph1" }; |
@@ -700,7 +703,8 @@ static SUNXI_CCU_GATE(avs_clk, "avs", "osc24M", | |||
700 | 703 | ||
701 | static const char * const hdmi_parents[] = { "pll-video0", "pll-video1" }; | 704 | static const char * const hdmi_parents[] = { "pll-video0", "pll-video1" }; |
702 | static SUNXI_CCU_M_WITH_MUX_GATE(hdmi_clk, "hdmi", hdmi_parents, | 705 | static SUNXI_CCU_M_WITH_MUX_GATE(hdmi_clk, "hdmi", hdmi_parents, |
703 | 0x150, 0, 4, 24, 2, BIT(31), 0); | 706 | 0x150, 0, 4, 24, 2, BIT(31), |
707 | CLK_SET_RATE_PARENT); | ||
704 | 708 | ||
705 | static SUNXI_CCU_GATE(hdmi_slow_clk, "hdmi-slow", "osc24M", | 709 | static SUNXI_CCU_GATE(hdmi_slow_clk, "hdmi-slow", "osc24M", |
706 | 0x154, BIT(31), 0); | 710 | 0x154, BIT(31), 0); |