blob: 881d0f19f87d6b731b56fb92186be16ec1045a71 [file] [log] [blame]
Tim Wawrzynczak605660b2022-06-08 12:48:19 -06001--
2-- Copyright (C) 2022 Google, LLC
3--
4-- This program is free software; you can redistribute it and/or modify
5-- it under the terms of the GNU General Public License as published by
6-- the Free Software Foundation; either version 2 of the License, or
7-- (at your option) any later version.
8--
9-- This program is distributed in the hope that it will be useful,
10-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-- GNU General Public License for more details.
13--
14
15with HW.GFX.GMA.Config_Helpers;
16
17private package HW.GFX.GMA.Power_And_Clocks is
18
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060019 subtype Refclk_Range is Frequency_Type range 19_200_000 .. 38_400_000;
20 subtype Refclk_Range_KHz is Pos64
21 range (Refclk_Range'First / 1000) .. (Refclk_Range'Last / 1000);
22
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060023 procedure Pre_All_Off;
24 procedure Post_All_Off;
25
26 procedure Initialize;
27
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060028 procedure Limit_Dotclocks
29 (Configs : in out Pipe_Configs;
30 CDClk_Switch : out Boolean)
31 with
32 Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060033
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060034 procedure Update_CDClk (Configs : in out Pipe_Configs)
35 with
36 Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060037 procedure Enable_CDClk;
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060038
39 procedure Power_Set_To (Configs : Pipe_Configs);
Nico Huber41e86742024-07-17 17:10:28 +020040 procedure Power_Up (Port : Active_Port_Type; Success : out Boolean);
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060041 procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs);
42 procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs);
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060043
44 procedure Get_Refclk (Refclk : out Refclk_Range);
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060045
46end HW.GFX.GMA.Power_And_Clocks;