From: Tomi Valkeinen Date: Thu, 3 Mar 2011 11:16:23 +0000 (+0200) Subject: HACK: OMAP: DSS2: add delay after enabling clocks X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85604b0a247615157cedfec46b9cbfde2884f80f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git HACK: OMAP: DSS2: add delay after enabling clocks On omap4 the registers may not be accessible right after enabling the clocks. At some point this will be handled by pm_runtime, but, for the time begin, adding a small delay after clk_enable() should make things work. Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index e5da050bcf85..2be4d03ece43 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -850,6 +850,14 @@ void dss_clk_enable(enum dss_clock clks) dss_clk_enable_no_ctx(clks); + /* + * HACK: On omap4 the registers may not be accessible right after + * enabling the clocks. At some point this will be handled by + * pm_runtime, but for the time begin this should make things work. + */ + if (cpu_is_omap44xx() && check_ctx) + udelay(10); + if (check_ctx && cpu_is_omap34xx() && dss_need_ctx_restore()) restore_all_ctx(); }