aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-09-16 05:16:11 -0400
committerStephen Boyd <sboyd@codeaurora.org>2016-09-20 19:57:15 -0400
commitd8846023aed1293e54d33499558fc2aa2b2f393f (patch)
tree9a7f1d94619514e9ec091d5b40164d6c6a91d33c
parentb1d51b448e4e6a392283b3eab06a7c5ec6d8a4e2 (diff)
clk: imx6: initialize GPU clocks
Initialize the GPU clock muxes to sane inputs. Until now they have not been changed from their default values, which means that both GPU3D shader and GPU2D core were fed by clock inputs whose rates exceed the maximium allowed frequency of the cores by as much as 200MHz. This fixes a severe GPU stability issue on i.MX6DL. Cc: stable@vger.kernel.org Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Shawn Guo <shawnguo@kernel.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--drivers/clk/imx/clk-imx6q.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index 64c243173395..ce8ea10407e4 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -633,6 +633,24 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
633 if (IS_ENABLED(CONFIG_PCI_IMX6)) 633 if (IS_ENABLED(CONFIG_PCI_IMX6))
634 clk_set_parent(clk[IMX6QDL_CLK_LVDS1_SEL], clk[IMX6QDL_CLK_SATA_REF_100M]); 634 clk_set_parent(clk[IMX6QDL_CLK_LVDS1_SEL], clk[IMX6QDL_CLK_SATA_REF_100M]);
635 635
636 /*
637 * Initialize the GPU clock muxes, so that the maximum specified clock
638 * rates for the respective SoC are not exceeded.
639 */
640 if (clk_on_imx6dl()) {
641 clk_set_parent(clk[IMX6QDL_CLK_GPU3D_CORE_SEL],
642 clk[IMX6QDL_CLK_PLL2_PFD1_594M]);
643 clk_set_parent(clk[IMX6QDL_CLK_GPU2D_CORE_SEL],
644 clk[IMX6QDL_CLK_PLL2_PFD1_594M]);
645 } else if (clk_on_imx6q()) {
646 clk_set_parent(clk[IMX6QDL_CLK_GPU3D_CORE_SEL],
647 clk[IMX6QDL_CLK_MMDC_CH0_AXI]);
648 clk_set_parent(clk[IMX6QDL_CLK_GPU3D_SHADER_SEL],
649 clk[IMX6QDL_CLK_PLL2_PFD1_594M]);
650 clk_set_parent(clk[IMX6QDL_CLK_GPU2D_CORE_SEL],
651 clk[IMX6QDL_CLK_PLL3_USB_OTG]);
652 }
653
636 imx_register_uart_clocks(uart_clks); 654 imx_register_uart_clocks(uart_clks);
637} 655}
638CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init); 656CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init);