gma: Move Legacy_VGA_Off() into Pipe_Setup
It's about the VGA plane and thus belongs into Pipe_Setup.
Change-Id: I2f59b027c47c06b01f36695c517ed0847617a472
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17762
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 379421c..0fb4e5d 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -28,7 +28,6 @@
with HW.Debug;
with GNAT.Source_Info;
-use type HW.Word8;
use type HW.Int32;
package body HW.GFX.GMA
@@ -84,20 +83,6 @@
----------------------------------------------------------------------------
- procedure Legacy_VGA_Off
- is
- Reg8 : Word8;
- begin
- -- disable legacy VGA plane, taking over control now
- Port_IO.OutB (VGA_SR_INDEX, VGA_SR01);
- Port_IO.InB (Reg8, VGA_SR_DATA);
- Port_IO.OutB (VGA_SR_DATA, Reg8 or 1 * 2 ** 5);
- Time.U_Delay (100); -- PRM says 100us, Linux does 300
- Registers.Set_Mask (Registers.VGACNTRL, 1 * 2 ** 31);
- end Legacy_VGA_Off;
-
- ----------------------------------------------------------------------------
-
procedure Update_Outputs (Configs : Pipe_Configs)
is
Did_Power_Up : Boolean := False;
@@ -354,9 +339,6 @@
Panel.Setup_PP_Sequencer;
Port_Detect.Initialize;
- Legacy_VGA_Off; -- According to PRMs, VGA plane is the only
- -- thing that's enabled by default after reset.
-
if Clean_State then
Power_And_Clocks.Pre_All_Off;
Connectors.Pre_All_Off;
@@ -364,6 +346,10 @@
Connectors.Post_All_Off;
PLLs.All_Off;
Power_And_Clocks.Post_All_Off;
+ else
+ -- According to PRMs, VGA plane is the only thing
+ -- that's enabled by default after reset.
+ Display_Controller.Legacy_VGA_Off;
end if;
-------------------- Now restart from a clean state ---------------------