mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 16:46:23 +00:00
gma ddi: Move conditionally used Program_Buffer_Translations()
When compiled for Broxton, Buffers.Translations() is a stub and GCC 8 correctly identifies the use of unitialized fields. However, it can't see that it's never called in that case. Draw the definition of Program_Buffer_Translations() inside the respective `if` to make that clear. Change-Id: I8edbb8ac9249d76465d1cd07526fb6eeef0618e1 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/26305 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
This commit is contained in:
@@ -296,29 +296,32 @@ package body HW.GFX.GMA.Connectors.DDI is
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
procedure Program_Buffer_Translations (Port : Digital_Port)
|
||||
is
|
||||
Buffer_Translations : Buf_Trans_Array;
|
||||
begin
|
||||
Buffers.Translations (Buffer_Translations, Port);
|
||||
for I in Buf_Trans_Range loop
|
||||
Registers.Write
|
||||
(Register => DDI_Regs (Port).BUF_TRANS (I),
|
||||
Value => Buffer_Translations (I));
|
||||
end loop;
|
||||
end Program_Buffer_Translations;
|
||||
|
||||
procedure Initialize
|
||||
is
|
||||
Iboost_Value : constant Word32 := 1;
|
||||
begin
|
||||
if Config.Has_DDI_Buffer_Trans then
|
||||
for Port in Digital_Port range DIGI_A .. Config.Last_Digital_Port loop
|
||||
Program_Buffer_Translations (Port);
|
||||
end loop;
|
||||
if Config.Is_FDI_Port (Analog) then
|
||||
Program_Buffer_Translations (DIGI_E);
|
||||
end if;
|
||||
declare
|
||||
procedure Program_Buffer_Translations (Port : Digital_Port)
|
||||
is
|
||||
Buffer_Translations : Buf_Trans_Array;
|
||||
begin
|
||||
Buffers.Translations (Buffer_Translations, Port);
|
||||
for I in Buf_Trans_Range loop
|
||||
Registers.Write
|
||||
(Register => DDI_Regs (Port).BUF_TRANS (I),
|
||||
Value => Buffer_Translations (I));
|
||||
end loop;
|
||||
end Program_Buffer_Translations;
|
||||
begin
|
||||
for Port in Digital_Port range DIGI_A .. Config.Last_Digital_Port
|
||||
loop
|
||||
Program_Buffer_Translations (Port);
|
||||
end loop;
|
||||
if Config.Is_FDI_Port (Analog) then
|
||||
Program_Buffer_Translations (DIGI_E);
|
||||
end if;
|
||||
end;
|
||||
end if;
|
||||
|
||||
if Config.Has_Iboost_Config then
|
||||
|
||||
Reference in New Issue
Block a user