<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27054">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gma broxton power/clocks: Turn pre-condition into code<br><br>In case `Config.Default_CDClk_Freq` is not constant, we have<br>to filter it.<br><br>Change-Id: I3ccafdc91a6e11fdc565e154f1394598a4572449<br>Signed-off-by: Nico Huber <nico.h@gmx.de><br>---<br>M common/broxton/hw-gfx-gma-power_and_clocks.adb<br>1 file changed, 8 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/54/27054/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/common/broxton/hw-gfx-gma-power_and_clocks.adb b/common/broxton/hw-gfx-gma-power_and_clocks.adb</span><br><span>index 8aa9a21..f6576d9 100644</span><br><span>--- a/common/broxton/hw-gfx-gma-power_and_clocks.adb</span><br><span>+++ b/common/broxton/hw-gfx-gma-power_and_clocks.adb</span><br><span>@@ -216,12 +216,15 @@</span><br><span> </span><br><span>    CDClk_Ref : constant := 19_200_000;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   procedure Set_CDClk (Freq : Frequency_Type)</span><br><span style="color: hsl(0, 100%, 40%);">-   with</span><br><span style="color: hsl(0, 100%, 40%);">-      Pre =></span><br><span style="color: hsl(0, 100%, 40%);">-         Freq =   CDClk_Ref or Freq = 144_000_000 or Freq = 288_000_000 or</span><br><span style="color: hsl(0, 100%, 40%);">-         Freq = 384_000_000 or Freq = 576_000_000 or Freq = 624_000_000</span><br><span style="color: hsl(120, 100%, 40%);">+   procedure Set_CDClk (Freq_In : Frequency_Type)</span><br><span>    is</span><br><span style="color: hsl(120, 100%, 40%);">+      Freq : constant Frequency_Type :=</span><br><span style="color: hsl(120, 100%, 40%);">+        (if    Freq_In  = CDClk_Ref    then CDClk_Ref</span><br><span style="color: hsl(120, 100%, 40%);">+         elsif Freq_In <= 144_000_000  then 144_000_000</span><br><span style="color: hsl(120, 100%, 40%);">+         elsif Freq_In <= 288_000_000  then 288_000_000</span><br><span style="color: hsl(120, 100%, 40%);">+         elsif Freq_In <= 384_000_000  then 384_000_000</span><br><span style="color: hsl(120, 100%, 40%);">+         elsif Freq_In <= 576_000_000  then 576_000_000</span><br><span style="color: hsl(120, 100%, 40%);">+                                       else 624_000_000);</span><br><span>       VCO : constant Int64 :=</span><br><span>          CDClk_Ref *</span><br><span>            (if Freq = CDClk_Ref then</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27054">change 27054</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/27054"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libgfxinit </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I3ccafdc91a6e11fdc565e154f1394598a4572449 </div>
<div style="display:none"> Gerrit-Change-Number: 27054 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>