Move `PSR_Off` out of `Power_And_Clocks_Haswell`
Allowing other platforms to use the Haswell-specific power and clocks
package precludes with'ing other Haswell-specific units unless they are
placed under `haswell_shared` as well. This unnecessarily forces several
implementation-specific details to be public, breaking encapsulation.
The only benefit is that the `PSR_Off` procedure gets to be shared.
However, we can allow reusing said procedure without having to destroy
encapsulation, by moving it elsewhere. As the SRD/PSR registers are tied
to transcoders, place `PSR_Off` and the corresponding definitions to the
common `Transcoder` package. Also update the callers of this procedure
to refer to the `Transcoder` package, and then drop the visibility of
the power and clocks package for Haswell.
Change-Id: I7483409b8b7db58874cbba3c0a7edb1968bba456
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/43563
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb b/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
index 93d8d18..15ba76c 100644
--- a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
+++ b/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
@@ -19,7 +19,7 @@
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Registers;
with HW.GFX.GMA.PCode;
-with HW.GFX.GMA.Power_And_Clocks_Haswell;
+with HW.GFX.GMA.Transcoder;
use type HW.Word64;
@@ -209,7 +209,7 @@
procedure Pre_All_Off is
begin
- Power_And_Clocks_Haswell.PSR_Off;
+ Transcoder.PSR_Off;
end Pre_All_Off;
procedure Post_All_Off is