gma: Turn constants depending on Config.CPU* into functions
To reduce elaboration time dependencies, turn constants at package
level into functions. This will allow us to use the same code for
configurations with constant and non-constant `GMA.Config.CPU*`.
Change-Id: I0522f5c63c63080bf9633f3d1b6019f35e52d226
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/27062
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/ironlake/hw-gfx-gma-pch-hdmi.adb b/common/ironlake/hw-gfx-gma-pch-hdmi.adb
index e53d85a..aaf7951 100644
--- a/common/ironlake/hw-gfx-gma-pch-hdmi.adb
+++ b/common/ironlake/hw-gfx-gma-pch-hdmi.adb
@@ -31,13 +31,13 @@
PCH_HDMI_HSYNC_ACTIVE_HIGH : constant := 1 * 2 ** 3;
PCH_HDMI_PORT_DETECT : constant := 1 * 2 ** 2;
- PCH_HDMI_MASK : constant Word32 :=
- PCH_TRANSCODER_SELECT_MASK or
+ function PCH_HDMI_MASK return Word32 is
+ (PCH_TRANSCODER_SELECT_MASK or
PCH_HDMI_ENABLE or
PCH_HDMI_COLOR_FORMAT_MASK or
PCH_HDMI_SDVO_ENCODING_MASK or
PCH_HDMI_HSYNC_ACTIVE_HIGH or
- PCH_HDMI_VSYNC_ACTIVE_HIGH;
+ PCH_HDMI_VSYNC_ACTIVE_HIGH);
type PCH_HDMI_Array is array (PCH_HDMI_Port) of Registers.Registers_Index;
PCH_HDMI : constant PCH_HDMI_Array := PCH_HDMI_Array'