blob: fc68a9a12400bc137d55214bb0b9592468aa8116 [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;
Nico Huber27d26272026-05-27 19:01:09 +020016with HW.GFX.GMA.Power_Domains;
17with HW.GFX.GMA.Power_Domains_Common;
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060018
19private package HW.GFX.GMA.Power_And_Clocks is
20
Nico Huberac2a1412026-07-02 10:41:59 +020021 subtype RefClk_Range is Frequency_Type range 19_200_000 .. 38_400_000;
22 subtype RefClk_Range_KHz is Pos64
23 range (RefClk_Range'First / 1000) .. (RefClk_Range'Last / 1000);
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060024
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060025 procedure Pre_All_Off;
26 procedure Post_All_Off;
27
28 procedure Initialize;
29
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060030 procedure Limit_Dotclocks
31 (Configs : in out Pipe_Configs;
32 CDClk_Switch : out Boolean)
33 with
34 Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060035
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060036 procedure Update_CDClk (Configs : in out Pipe_Configs)
37 with
38 Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060039 procedure Enable_CDClk;
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060040
Nico Huber27d26272026-05-27 19:01:09 +020041 procedure Power_Set_To (Configs : Pipe_Configs)
42 renames
43 Power_Domains_Common.Power_Set_To;
44 procedure Power_Up (Port : Active_Port_Type; Success : out Boolean)
45 renames
46 Power_Domains.Power_Up;
47 procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs)
48 renames
49 Power_Domains_Common.Power_Up;
50 procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs)
51 renames
52 Power_Domains_Common.Power_Down;
Tim Wawrzynczak6db27c42022-09-09 10:49:55 -060053
Nico Huberac2a1412026-07-02 10:41:59 +020054 procedure Get_RefClk (RefClk : out RefClk_Range);
Tim Wawrzynczak605660b2022-06-08 12:48:19 -060055
56end HW.GFX.GMA.Power_And_Clocks;