gma skylake power/clocks: Refactor to allow proof without inlining

Change-Id: Ie660c69377d8624a3a6662c6ccb7b5e4efcd4629
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/26847
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb b/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
index ea84992..c6eb2cf 100644
--- a/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
+++ b/common/skylake/hw-gfx-gma-power_and_clocks_skylake.adb
@@ -89,11 +89,11 @@
    GT_MAILBOX_READY                    : constant := 1 * 2 ** 31;
 
    function CDCLK_CTL_CD_FREQ_DECIMAL
-     (Freq        : Positive;
+     (Freq        : Pos16;
       Plus_Half   : Boolean)
       return Word32 is
    begin
-      return Word32 (2 * (Freq - 1)) or (if Plus_Half then 1 else 0);
+      return Word32 (2 * (Pos32 (Freq) - 1)) or (if Plus_Half then 1 else 0);
    end CDCLK_CTL_CD_FREQ_DECIMAL;
 
    ----------------------------------------------------------------------------