[coreboot-gerrit] Change in libgfxinit[master]: gma broxton power/clocks: Turn pre-condition into code
Nico Huber (Code Review)
gerrit at coreboot.org
Wed Jun 13 01:27:36 CEST 2018
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/27054
Change subject: gma broxton power/clocks: Turn pre-condition into code
......................................................................
gma broxton power/clocks: Turn pre-condition into code
In case `Config.Default_CDClk_Freq` is not constant, we have
to filter it.
Change-Id: I3ccafdc91a6e11fdc565e154f1394598a4572449
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M common/broxton/hw-gfx-gma-power_and_clocks.adb
1 file changed, 8 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/54/27054/1
diff --git a/common/broxton/hw-gfx-gma-power_and_clocks.adb b/common/broxton/hw-gfx-gma-power_and_clocks.adb
index 8aa9a21..f6576d9 100644
--- a/common/broxton/hw-gfx-gma-power_and_clocks.adb
+++ b/common/broxton/hw-gfx-gma-power_and_clocks.adb
@@ -216,12 +216,15 @@
CDClk_Ref : constant := 19_200_000;
- procedure Set_CDClk (Freq : Frequency_Type)
- with
- Pre =>
- Freq = CDClk_Ref or Freq = 144_000_000 or Freq = 288_000_000 or
- Freq = 384_000_000 or Freq = 576_000_000 or Freq = 624_000_000
+ procedure Set_CDClk (Freq_In : Frequency_Type)
is
+ Freq : constant Frequency_Type :=
+ (if Freq_In = CDClk_Ref then CDClk_Ref
+ elsif Freq_In <= 144_000_000 then 144_000_000
+ elsif Freq_In <= 288_000_000 then 288_000_000
+ elsif Freq_In <= 384_000_000 then 384_000_000
+ elsif Freq_In <= 576_000_000 then 576_000_000
+ else 624_000_000);
VCO : constant Int64 :=
CDClk_Ref *
(if Freq = CDClk_Ref then
--
To view, visit https://review.coreboot.org/27054
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ccafdc91a6e11fdc565e154f1394598a4572449
Gerrit-Change-Number: 27054
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180612/3612d8a0/attachment-0001.html>
More information about the coreboot-gerrit
mailing list