gma skl: Disable DDI clocks on reset path
After reset DPLL_CTRL2 is initialized to 0. Which means some clock
disable bits are not set and might cause some hassle later. Set them
and close the related TODO.
Change-Id: I1a470dff55e317e8119906b3e397f6f2314abcbd
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20648
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb b/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
index 0fc4ad9..fa62a98 100644
--- a/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
+++ b/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
@@ -747,4 +747,18 @@
end if;
end Off;
+ ----------------------------------------------------------------------------
+
+ procedure Post_Reset_Off
+ is
+ Clocks_Off : Word32 := 0;
+ begin
+ if not Config.Has_Per_DDI_Clock_Sel and not Config.Has_DDI_PHYs then
+ for Port in Digital_Port loop
+ Clocks_Off := Clocks_Off or DPLL_CTRL2_DDIx_CLOCK_OFF (Port);
+ end loop;
+ Registers.Set_Mask (Registers.DPLL_CTRL2, Clocks_Off);
+ end if;
+ end Post_Reset_Off;
+
end HW.GFX.GMA.Connectors.DDI;