Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/34473 )
Change subject: gma panel: Add `Debug_Sts` flag to dump PP_STATUS register ......................................................................
gma panel: Add `Debug_Sts` flag to dump PP_STATUS register
Change-Id: I68955ee315ddd25a58606ac3827257b6c716342e Signed-off-by: Nico Huber nico.h@gmx.de --- M common/hw-gfx-gma-panel.adb 1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/73/34473/1
diff --git a/common/hw-gfx-gma-panel.adb b/common/hw-gfx-gma-panel.adb index bc0f7b8..e8eb170 100644 --- a/common/hw-gfx-gma-panel.adb +++ b/common/hw-gfx-gma-panel.adb @@ -20,6 +20,8 @@
package body HW.GFX.GMA.Panel is + Debug_Sts : constant Boolean := True; + type Delays_Enum is (Power_Up_Delay, Power_Up_To_BL_On, @@ -252,6 +254,7 @@ procedure On (Wait : Boolean := True) is begin pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); + pragma Debug (Debug_Sts, (Registers.Posting_Read (Panel_PP_Regs.STATUS)));
Registers.Set_Mask (Panel_PP_Regs.CONTROL, PCH_PP_CONTROL_TARGET_ON); if Wait then @@ -262,6 +265,7 @@ procedure Wait_On is begin pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); + pragma Debug (Debug_Sts, (Registers.Posting_Read (Panel_PP_Regs.STATUS)));
Registers.Wait_Unset_Mask (Register => Panel_PP_Regs.STATUS, @@ -269,22 +273,32 @@ PCH_PP_STATUS_PWR_CYC_DELAY_ACTIVE, TOut_MS => 820 + 3_100 + 820); -- theoretical max: off + cycle + on
+ pragma Debug (Debug_Sts, (Registers.Posting_Read (Panel_PP_Regs.STATUS))); + Registers.Unset_Mask (Panel_PP_Regs.CONTROL, PCH_PP_CONTROL_VDD_OVERRIDE); + + pragma Debug (Debug_Sts, (Registers.Posting_Read (Panel_PP_Regs.STATUS))); end Wait_On;
procedure Off is begin pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); + pragma Debug (Debug_Sts, (Registers.Posting_Read (Panel_PP_Regs.STATUS)));
Registers.Unset_Mask (Register => Panel_PP_Regs.CONTROL, Mask => PCH_PP_CONTROL_TARGET_ON or PCH_PP_CONTROL_VDD_OVERRIDE); + + pragma Debug (Debug_Sts, (Registers.Posting_Read (Panel_PP_Regs.STATUS))); + Registers.Wait_Unset_Mask (Register => Panel_PP_Regs.STATUS, Mask => PCH_PP_STATUS_PWR_SEQ_PROGRESS_MASK or PCH_PP_STATUS_PWR_CYC_DELAY_ACTIVE, TOut_MS => 820 + 3_100 + 820); -- theoretical max: on + cycle + off + + pragma Debug (Debug_Sts, (Registers.Posting_Read (Panel_PP_Regs.STATUS))); end Off;
----------------------------------------------------------------------------