summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-09-09 01:54:47 -0700
committerYe Li <ye.li@nxp.com>2019-09-10 19:39:36 -0700
commit104c4b5cdc83fb671c6474708bdd00c2dfb01113 (patch)
treea59e5c5571fba4196d3c924ca9fc6ff21a49b0d7 /arch
parent040c54d77a33b372e82b1dc9a5efc14d94b2efb3 (diff)
MLK-22576 imx8: video: Set clock parent for DC0 display channel
When enable u-boot splash screen and set kernel dtb with -hdmi.dtb on imx8qm, the kernel reboot (partition reboot) will hang in u-boot if HDMI cable is plugged in. The root cause is kernel set the clock source of DC0 display0 channel to bypass clock, when doing reboot this clock setting may not be cleared. So u-boot has wrong clock source and cause lpcg stop bit always set. Fix the issue by adding the clock parent setting and not depend on default parent value. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/imx8/video_common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8/video_common.c b/arch/arm/mach-imx/imx8/video_common.c
index 01ab94a00e..69c7e7df5c 100644
--- a/arch/arm/mach-imx/imx8/video_common.c
+++ b/arch/arm/mach-imx/imx8/video_common.c
@@ -399,6 +399,18 @@ int display_controller_setup(sc_pm_clock_rate_t pixel_clock)
return -EIO;
}
+ err = sc_pm_set_clock_parent(ipcHndl, dc_rsrc, SC_PM_CLK_MISC0, 2);
+ if (err != SC_ERR_NONE) {
+ printf("DISP0 set clock parent failed! (error = %d)\n", err);
+ return -EIO;
+ }
+
+ err = sc_pm_set_clock_parent(ipcHndl, dc_rsrc, SC_PM_CLK_MISC1, 3);
+ if (err != SC_ERR_NONE) {
+ printf("DISP0 set clock parent failed! (error = %d)\n", err);
+ return -EIO;
+ }
+
err = sc_pm_set_clock_rate(ipcHndl, dc_rsrc, SC_PM_CLK_MISC1, &pixel_clock);
if (err != SC_ERR_NONE) {
printf("DISP1 set clock rate failed! (error = %d)\n", err);