Drop generation suffix from `Power_And_Clocks`
There's no need to differentiate between `Power_And_Clocks` packages for
different generations anymore.
Change-Id: Ide297d52959285e93185c84690a343a2679282db
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/43597
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/haswell/Makefile.inc b/common/haswell/Makefile.inc
index 32657a8..f54ac13 100644
--- a/common/haswell/Makefile.inc
+++ b/common/haswell/Makefile.inc
@@ -8,8 +8,7 @@
gfxinit-y += hw-gfx-gma-plls-wrpll.ads
gfxinit-y += hw-gfx-gma-plls.adb
gfxinit-y += hw-gfx-gma-plls.ads
+gfxinit-y += hw-gfx-gma-power_and_clocks.adb
gfxinit-y += hw-gfx-gma-power_and_clocks.ads
-gfxinit-y += hw-gfx-gma-power_and_clocks_haswell.adb
-gfxinit-y += hw-gfx-gma-power_and_clocks_haswell.ads
gfxinit-y += hw-gfx-gma-spll.adb
gfxinit-y += hw-gfx-gma-spll.ads
diff --git a/common/haswell/hw-gfx-gma-power_and_clocks_haswell.adb b/common/haswell/hw-gfx-gma-power_and_clocks.adb
similarity index 98%
rename from common/haswell/hw-gfx-gma-power_and_clocks_haswell.adb
rename to common/haswell/hw-gfx-gma-power_and_clocks.adb
index fa52899..6a00a5f 100644
--- a/common/haswell/hw-gfx-gma-power_and_clocks_haswell.adb
+++ b/common/haswell/hw-gfx-gma-power_and_clocks.adb
@@ -23,7 +23,7 @@
with HW.GFX.GMA.Transcoder;
with HW.GFX.GMA.PCH.Lynxpoint;
-package body HW.GFX.GMA.Power_And_Clocks_Haswell is
+package body HW.GFX.GMA.Power_And_Clocks is
LCPLL_CTL_CD_FREQ_SEL_MASK : constant := 3 * 2 ** 26;
LCPLL_CTL_CD_FREQ_SEL_450_MHZ : constant := 0 * 2 ** 26;
@@ -351,4 +351,4 @@
end if;
end Power_Down;
-end HW.GFX.GMA.Power_And_Clocks_Haswell;
+end HW.GFX.GMA.Power_And_Clocks;
diff --git a/common/haswell/hw-gfx-gma-power_and_clocks.ads b/common/haswell/hw-gfx-gma-power_and_clocks.ads
index 7aaacd6..e4f2611 100644
--- a/common/haswell/hw-gfx-gma-power_and_clocks.ads
+++ b/common/haswell/hw-gfx-gma-power_and_clocks.ads
@@ -12,7 +12,27 @@
-- GNU General Public License for more details.
--
-with HW.GFX.GMA.Power_And_Clocks_Haswell;
+with HW.GFX.GMA.Config_Helpers;
-private package HW.GFX.GMA.Power_And_Clocks
- renames HW.GFX.GMA.Power_And_Clocks_Haswell;
+private package HW.GFX.GMA.Power_And_Clocks is
+
+ procedure Pre_All_Off;
+ procedure Post_All_Off;
+
+ procedure Initialize;
+
+ procedure Limit_Dotclocks
+ (Configs : in out Pipe_Configs;
+ CDClk_Switch : out Boolean)
+ with
+ Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Update_CDClk (Configs : in out Pipe_Configs)
+ with
+ Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Enable_CDClk is null;
+
+ procedure Power_Set_To (Configs : Pipe_Configs);
+ procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs);
+ procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs);
+
+end HW.GFX.GMA.Power_And_Clocks;
diff --git a/common/haswell/hw-gfx-gma-power_and_clocks_haswell.ads b/common/haswell/hw-gfx-gma-power_and_clocks_haswell.ads
deleted file mode 100644
index 488b90c..0000000
--- a/common/haswell/hw-gfx-gma-power_and_clocks_haswell.ads
+++ /dev/null
@@ -1,38 +0,0 @@
---
--- Copyright (C) 2016 secunet Security Networks AG
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
-
-with HW.GFX.GMA.Config_Helpers;
-
-private package HW.GFX.GMA.Power_And_Clocks_Haswell is
-
- procedure Pre_All_Off;
- procedure Post_All_Off;
-
- procedure Initialize;
-
- procedure Limit_Dotclocks
- (Configs : in out Pipe_Configs;
- CDClk_Switch : out Boolean)
- with
- Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
- procedure Update_CDClk (Configs : in out Pipe_Configs)
- with
- Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
- procedure Enable_CDClk is null;
-
- procedure Power_Set_To (Configs : Pipe_Configs);
- procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs);
- procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs);
-
-end HW.GFX.GMA.Power_And_Clocks_Haswell;
diff --git a/common/ironlake/Makefile.inc b/common/ironlake/Makefile.inc
index 468bb95..4859cf7 100644
--- a/common/ironlake/Makefile.inc
+++ b/common/ironlake/Makefile.inc
@@ -12,6 +12,5 @@
gfxinit-y += hw-gfx-gma-plls.adb
gfxinit-y += hw-gfx-gma-plls.ads
gfxinit-y += hw-gfx-gma-port_detect.adb
+gfxinit-y += hw-gfx-gma-power_and_clocks.adb
gfxinit-y += hw-gfx-gma-power_and_clocks.ads
-gfxinit-y += hw-gfx-gma-power_and_clocks_ironlake.adb
-gfxinit-y += hw-gfx-gma-power_and_clocks_ironlake.ads
diff --git a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb b/common/ironlake/hw-gfx-gma-power_and_clocks.adb
similarity index 96%
rename from common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb
rename to common/ironlake/hw-gfx-gma-power_and_clocks.adb
index 9bc5544..6bd43e1 100644
--- a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb
+++ b/common/ironlake/hw-gfx-gma-power_and_clocks.adb
@@ -16,7 +16,7 @@
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Registers;
-package body HW.GFX.GMA.Power_And_Clocks_Ironlake is
+package body HW.GFX.GMA.Power_And_Clocks is
PCH_DREF_CONTROL_120MHZ_CPU_OUTPUT_MASK : constant := 3 * 2 ** 13;
PCH_DREF_CONTROL_120MHZ_CPU_OUTPUT_SSC : constant := 2 * 2 ** 13;
@@ -65,4 +65,4 @@
CDClk_Switch := False;
end Limit_Dotclocks;
-end HW.GFX.GMA.Power_And_Clocks_Ironlake;
+end HW.GFX.GMA.Power_And_Clocks;
diff --git a/common/ironlake/hw-gfx-gma-power_and_clocks.ads b/common/ironlake/hw-gfx-gma-power_and_clocks.ads
index 38eccc0..313239b 100644
--- a/common/ironlake/hw-gfx-gma-power_and_clocks.ads
+++ b/common/ironlake/hw-gfx-gma-power_and_clocks.ads
@@ -12,7 +12,31 @@
-- GNU General Public License for more details.
--
-with HW.GFX.GMA.Power_And_Clocks_Ironlake;
+with HW.GFX.GMA.Config_Helpers;
-private package HW.GFX.GMA.Power_And_Clocks
- renames HW.GFX.GMA.Power_And_Clocks_Ironlake;
+private package HW.GFX.GMA.Power_And_Clocks is
+
+ procedure Initialize;
+
+ procedure Limit_Dotclocks
+ (Configs : in out Pipe_Configs;
+ CDClk_Switch : out Boolean)
+ with
+ Post =>
+ not CDClk_Switch and
+ Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Update_CDClk (Configs : in out Pipe_Configs) is null;
+ procedure Enable_CDClk is null;
+
+ procedure Pre_All_Off is null;
+
+ procedure Post_All_Off is null;
+
+ procedure Power_Set_To (Configs : Pipe_Configs) is null;
+
+ procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs) is null;
+
+ procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs)
+ is null;
+
+end HW.GFX.GMA.Power_And_Clocks;
diff --git a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads
deleted file mode 100644
index 00e83df..0000000
--- a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads
+++ /dev/null
@@ -1,42 +0,0 @@
---
--- Copyright (C) 2016 secunet Security Networks AG
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
-
-with HW.GFX.GMA.Config_Helpers;
-
-private package HW.GFX.GMA.Power_And_Clocks_Ironlake is
-
- procedure Initialize;
-
- procedure Limit_Dotclocks
- (Configs : in out Pipe_Configs;
- CDClk_Switch : out Boolean)
- with
- Post =>
- not CDClk_Switch and
- Config_Helpers.Stable_FB (Configs'Old, Configs);
- procedure Update_CDClk (Configs : in out Pipe_Configs) is null;
- procedure Enable_CDClk is null;
-
- procedure Pre_All_Off is null;
-
- procedure Post_All_Off is null;
-
- procedure Power_Set_To (Configs : Pipe_Configs) is null;
-
- procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs) is null;
-
- procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs)
- is null;
-
-end HW.GFX.GMA.Power_And_Clocks_Ironlake;
diff --git a/common/skylake/Makefile.inc b/common/skylake/Makefile.inc
index cf720bf..dc1e08d 100644
--- a/common/skylake/Makefile.inc
+++ b/common/skylake/Makefile.inc
@@ -7,7 +7,6 @@
gfxinit-y += hw-gfx-gma-plls-dpll_0.ads
gfxinit-y += hw-gfx-gma-plls.adb
gfxinit-y += hw-gfx-gma-plls.ads
+gfxinit-y += hw-gfx-gma-power_and_clocks.adb
gfxinit-y += hw-gfx-gma-power_and_clocks.ads
-gfxinit-y += hw-gfx-gma-power_and_clocks_skylake.adb
-gfxinit-y += hw-gfx-gma-power_and_clocks_skylake.ads
gfxinit-y += hw-gfx-gma-spll.ads
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb b/common/skylake/hw-gfx-gma-power_and_clocks.adb
similarity index 98%
rename from common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
rename to common/skylake/hw-gfx-gma-power_and_clocks.adb
index 15ba76c..4c8b6ac 100644
--- a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
+++ b/common/skylake/hw-gfx-gma-power_and_clocks.adb
@@ -23,7 +23,7 @@
use type HW.Word64;
-package body HW.GFX.GMA.Power_And_Clocks_Skylake is
+package body HW.GFX.GMA.Power_And_Clocks is
type Power_Domain is (MISC_IO, PW1, PW2, DDI_AE, DDI_B, DDI_C, DDI_D);
subtype Power_Well is Power_Domain range PW1 .. PW2;
@@ -395,4 +395,4 @@
end loop;
end Power_Down;
-end HW.GFX.GMA.Power_And_Clocks_Skylake;
+end HW.GFX.GMA.Power_And_Clocks;
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks.ads b/common/skylake/hw-gfx-gma-power_and_clocks.ads
index 98a3bba..e4f2611 100644
--- a/common/skylake/hw-gfx-gma-power_and_clocks.ads
+++ b/common/skylake/hw-gfx-gma-power_and_clocks.ads
@@ -12,7 +12,27 @@
-- GNU General Public License for more details.
--
-with HW.GFX.GMA.Power_And_Clocks_Skylake;
+with HW.GFX.GMA.Config_Helpers;
-private package HW.GFX.GMA.Power_And_Clocks
- renames HW.GFX.GMA.Power_And_Clocks_Skylake;
+private package HW.GFX.GMA.Power_And_Clocks is
+
+ procedure Pre_All_Off;
+ procedure Post_All_Off;
+
+ procedure Initialize;
+
+ procedure Limit_Dotclocks
+ (Configs : in out Pipe_Configs;
+ CDClk_Switch : out Boolean)
+ with
+ Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Update_CDClk (Configs : in out Pipe_Configs)
+ with
+ Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Enable_CDClk is null;
+
+ procedure Power_Set_To (Configs : Pipe_Configs);
+ procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs);
+ procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs);
+
+end HW.GFX.GMA.Power_And_Clocks;
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.ads b/common/skylake/hw-gfx-gma-power_and_clocks_skylake.ads
deleted file mode 100644
index d5b9685..0000000
--- a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.ads
+++ /dev/null
@@ -1,38 +0,0 @@
---
--- Copyright (C) 2016 secunet Security Networks AG
---
--- This program is free software; you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU General Public License for more details.
---
-
-with HW.GFX.GMA.Config_Helpers;
-
-private package HW.GFX.GMA.Power_And_Clocks_Skylake is
-
- procedure Pre_All_Off;
- procedure Post_All_Off;
-
- procedure Initialize;
-
- procedure Limit_Dotclocks
- (Configs : in out Pipe_Configs;
- CDClk_Switch : out Boolean)
- with
- Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
- procedure Update_CDClk (Configs : in out Pipe_Configs)
- with
- Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
- procedure Enable_CDClk is null;
-
- procedure Power_Set_To (Configs : Pipe_Configs);
- procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs);
- procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs);
-
-end HW.GFX.GMA.Power_And_Clocks_Skylake;