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)
committerShawn Guo <shawnguo@kernel.org>
Tue, 1 Nov 2016 12:55:27 +0000 (20:55 +0800)
commit03d576f202e8cd40d500aa4f7594ad702d861096
tree945b5b305988c14b203634eaebd560832d878527
parentf13abeff2cdee2256e5f1c5a63fcc57ca8357010
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