clk: imx6: Make the LDB_DI0 and LDB_DI1 clocks read-only
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 18 Oct 2016 00:29:13 +0000 (22:29 -0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:22 +0000 (14:47 -0500)
commit616947171c5a95013bae7d9ee7af056843b9a821
treeecfde2ccdf93021d6dde5e090dfd7aec54500a36
parent7d0805c4e235d4c85618f0b30e9ed8f8cd8c7acd
clk: imx6: Make the LDB_DI0 and LDB_DI1 clocks read-only

Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk
tree, the glitchy parent mux of ldb_di[x]_clk can cause a glitch to
enter the ldb_di_ipu_div divider. If the divider gets locked up, no
ldb_di[x]_clk is generated, and the LVDS display will hang when the
ipu_di_clk is sourced from ldb_di_clk.

To fix the problem, both the new and current parent of the ldb_di_clk
should be disabled before the switch. As this can not be guaranteed by
the clock framework during runtime, make the ldb_di[x]_sel muxes read-only.
A workaround to set the muxes once during boot could be added to the
kernel or bootloader.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-imx6q.c
drivers/clk/imx/clk.h