blob: 5826c1dfcc4fb43282170e0068177345e0aac5c4 [file] [log] [blame]
Nico Huber83693c82016-10-08 22:17:55 +02001--
2-- Copyright (C) 2015-2016 secunet Security Networks AG
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; version 2 of the License.
7--
8-- This program is distributed in the hope that it will be useful,
9-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11-- GNU General Public License for more details.
12--
13
14with HW.GFX.GMA.Config;
15
16private package HW.GFX.GMA.PCH is
17
18 type FDI_Port_Type is (FDI_A, FDI_B, FDI_C);
19
20 ----------------------------------------------------------------------------
21
22 -- common to all PCH outputs
23
24 PCH_TRANSCODER_SELECT_SHIFT : constant :=
25 (case Config.CPU is
26 when Ironlake => 30,
27 when Sandybridge | Ivybridge => 29,
28 when Haswell | Broadwell | Skylake => 0);
29
30 PCH_TRANSCODER_SELECT_MASK : constant :=
31 (case Config.CPU is
32 when Ironlake => 1 * 2 ** 30,
33 when Sandybridge | Ivybridge => 3 * 2 ** 29,
34 when Haswell | Broadwell | Skylake => 0);
35
36 type PCH_TRANSCODER_SELECT_Array is array (FDI_Port_Type) of Word32;
37 PCH_TRANSCODER_SELECT : constant PCH_TRANSCODER_SELECT_Array :=
38 (FDI_A => 0 * 2 ** PCH_TRANSCODER_SELECT_SHIFT,
39 FDI_B => 1 * 2 ** PCH_TRANSCODER_SELECT_SHIFT,
40 FDI_C => 2 * 2 ** PCH_TRANSCODER_SELECT_SHIFT);
41
42end HW.GFX.GMA.PCH;