gma config: Initialize stateful configs late
Defer initialization of config variables until GMA.Initialize().
Change-Id: I9192c9a7c4d67e4af7f3e26659489f58998ae832
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/27066
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index ea42443..d12a9f1 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -12,10 +12,7 @@
-- GNU General Public License for more details.
--
-private package HW.GFX.GMA.Config
-with
- Initializes => Variable
-is
+private package HW.GFX.GMA.Config is
Gen : constant Generation := <<GEN>>;
@@ -64,11 +61,11 @@
Raw_Clock : Frequency_Type;
end record;
- Variable : Variable_Config :=
+ Initial_Settings : constant Variable_Config :=
(Valid_Port => (others => False),
- Raw_Clock => Frequency_Type'First)
- with
- Part_Of => GMA.Config_State;
+ Raw_Clock => Frequency_Type'First);
+
+ Variable : Variable_Config with Part_Of => GMA.Config_State;
Valid_Port : Valid_Port_Array renames Variable.Valid_Port;
Raw_Clock : Frequency_Type renames Variable.Raw_Clock;