intel_chipset.h revision 3f012e29
122944501Smrg/*
222944501Smrg *
322944501Smrg * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
422944501Smrg * All Rights Reserved.
522944501Smrg *
622944501Smrg * Permission is hereby granted, free of charge, to any person obtaining a
722944501Smrg * copy of this software and associated documentation files (the
822944501Smrg * "Software"), to deal in the Software without restriction, including
922944501Smrg * without limitation the rights to use, copy, modify, merge, publish,
1022944501Smrg * distribute, sub license, and/or sell copies of the Software, and to
1122944501Smrg * permit persons to whom the Software is furnished to do so, subject to
1222944501Smrg * the following conditions:
1322944501Smrg *
1422944501Smrg * The above copyright notice and this permission notice (including the
1522944501Smrg * next paragraph) shall be included in all copies or substantial portions
1622944501Smrg * of the Software.
1722944501Smrg *
1822944501Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1922944501Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2022944501Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
2122944501Smrg * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
2222944501Smrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
2322944501Smrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
2422944501Smrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2522944501Smrg *
2622944501Smrg */
2722944501Smrg
2822944501Smrg#ifndef _INTEL_CHIPSET_H
2922944501Smrg#define _INTEL_CHIPSET_H
3022944501Smrg
31e88f27b3Smrg#define PCI_CHIP_I810			0x7121
32e88f27b3Smrg#define PCI_CHIP_I810_DC100		0x7123
33e88f27b3Smrg#define PCI_CHIP_I810_E			0x7125
34e88f27b3Smrg#define PCI_CHIP_I815			0x1132
35e88f27b3Smrg
36e88f27b3Smrg#define PCI_CHIP_I830_M			0x3577
37e88f27b3Smrg#define PCI_CHIP_845_G			0x2562
38e88f27b3Smrg#define PCI_CHIP_I855_GM		0x3582
39e88f27b3Smrg#define PCI_CHIP_I865_G			0x2572
40e88f27b3Smrg
41e88f27b3Smrg#define PCI_CHIP_I915_G			0x2582
42e88f27b3Smrg#define PCI_CHIP_E7221_G		0x258A
43e88f27b3Smrg#define PCI_CHIP_I915_GM		0x2592
44e88f27b3Smrg#define PCI_CHIP_I945_G			0x2772
45e88f27b3Smrg#define PCI_CHIP_I945_GM		0x27A2
46e88f27b3Smrg#define PCI_CHIP_I945_GME		0x27AE
47e88f27b3Smrg
48e88f27b3Smrg#define PCI_CHIP_Q35_G			0x29B2
49e88f27b3Smrg#define PCI_CHIP_G33_G			0x29C2
50e88f27b3Smrg#define PCI_CHIP_Q33_G			0x29D2
51e88f27b3Smrg
52e88f27b3Smrg#define PCI_CHIP_IGD_GM			0xA011
53e88f27b3Smrg#define PCI_CHIP_IGD_G			0xA001
54e88f27b3Smrg
55e88f27b3Smrg#define IS_IGDGM(devid)		((devid) == PCI_CHIP_IGD_GM)
56e88f27b3Smrg#define IS_IGDG(devid)		((devid) == PCI_CHIP_IGD_G)
57e88f27b3Smrg#define IS_IGD(devid)		(IS_IGDG(devid) || IS_IGDGM(devid))
58e88f27b3Smrg
59e88f27b3Smrg#define PCI_CHIP_I965_G			0x29A2
60e88f27b3Smrg#define PCI_CHIP_I965_Q			0x2992
61e88f27b3Smrg#define PCI_CHIP_I965_G_1		0x2982
62e88f27b3Smrg#define PCI_CHIP_I946_GZ		0x2972
63e88f27b3Smrg#define PCI_CHIP_I965_GM		0x2A02
64e88f27b3Smrg#define PCI_CHIP_I965_GME		0x2A12
65e88f27b3Smrg
66e88f27b3Smrg#define PCI_CHIP_GM45_GM		0x2A42
67e88f27b3Smrg
68e88f27b3Smrg#define PCI_CHIP_IGD_E_G		0x2E02
69e88f27b3Smrg#define PCI_CHIP_Q45_G			0x2E12
70e88f27b3Smrg#define PCI_CHIP_G45_G			0x2E22
71e88f27b3Smrg#define PCI_CHIP_G41_G			0x2E32
72e88f27b3Smrg
73e88f27b3Smrg#define PCI_CHIP_ILD_G			0x0042
74e88f27b3Smrg#define PCI_CHIP_ILM_G			0x0046
75e88f27b3Smrg
76e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_GT1	0x0102 /* desktop */
77e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_GT2	0x0112
78e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS	0x0122
79e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_M_GT1	0x0106 /* mobile */
80e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_M_GT2	0x0116
81e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS	0x0126
82e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_S		0x010A /* server */
83e88f27b3Smrg
84e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_GT1		0x0152 /* desktop */
85e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_GT2		0x0162
86e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_M_GT1	0x0156 /* mobile */
87e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_M_GT2	0x0166
88e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_S		0x015a /* server */
89e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_S_GT2	0x016a /* server */
90e88f27b3Smrg
91e88f27b3Smrg#define PCI_CHIP_HASWELL_GT1		0x0402 /* Desktop */
92e88f27b3Smrg#define PCI_CHIP_HASWELL_GT2		0x0412
93e88f27b3Smrg#define PCI_CHIP_HASWELL_GT3		0x0422
94e88f27b3Smrg#define PCI_CHIP_HASWELL_M_GT1		0x0406 /* Mobile */
95e88f27b3Smrg#define PCI_CHIP_HASWELL_M_GT2		0x0416
96e88f27b3Smrg#define PCI_CHIP_HASWELL_M_GT3		0x0426
97e88f27b3Smrg#define PCI_CHIP_HASWELL_S_GT1		0x040A /* Server */
98e88f27b3Smrg#define PCI_CHIP_HASWELL_S_GT2		0x041A
99e88f27b3Smrg#define PCI_CHIP_HASWELL_S_GT3		0x042A
100e88f27b3Smrg#define PCI_CHIP_HASWELL_B_GT1		0x040B /* Reserved */
101e88f27b3Smrg#define PCI_CHIP_HASWELL_B_GT2		0x041B
102e88f27b3Smrg#define PCI_CHIP_HASWELL_B_GT3		0x042B
103e88f27b3Smrg#define PCI_CHIP_HASWELL_E_GT1		0x040E /* Reserved */
104e88f27b3Smrg#define PCI_CHIP_HASWELL_E_GT2		0x041E
105e88f27b3Smrg#define PCI_CHIP_HASWELL_E_GT3		0x042E
106e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_GT1	0x0C02 /* Desktop */
107e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_GT2	0x0C12
108e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_GT3	0x0C22
109e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_M_GT1	0x0C06 /* Mobile */
110e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_M_GT2	0x0C16
111e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_M_GT3	0x0C26
112e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_S_GT1	0x0C0A /* Server */
113e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_S_GT2	0x0C1A
114e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_S_GT3	0x0C2A
115e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_B_GT1	0x0C0B /* Reserved */
116e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_B_GT2	0x0C1B
117e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_B_GT3	0x0C2B
118e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_E_GT1	0x0C0E /* Reserved */
119e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_E_GT2	0x0C1E
120e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_E_GT3	0x0C2E
121e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_GT1	0x0A02 /* Desktop */
122e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_GT2	0x0A12
123e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_GT3	0x0A22
124e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_M_GT1	0x0A06 /* Mobile */
125e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_M_GT2	0x0A16
126e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_M_GT3	0x0A26
127e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_S_GT1	0x0A0A /* Server */
128e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_S_GT2	0x0A1A
129e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_S_GT3	0x0A2A
130e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_B_GT1	0x0A0B /* Reserved */
131e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_B_GT2	0x0A1B
132e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_B_GT3	0x0A2B
133e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_E_GT1	0x0A0E /* Reserved */
134e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_E_GT2	0x0A1E
135e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_E_GT3	0x0A2E
136e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_GT1	0x0D02 /* Desktop */
137e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_GT2	0x0D12
138e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_GT3	0x0D22
139e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_M_GT1	0x0D06 /* Mobile */
140e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_M_GT2	0x0D16
141e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_M_GT3	0x0D26
142e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_S_GT1	0x0D0A /* Server */
143e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_S_GT2	0x0D1A
144e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_S_GT3	0x0D2A
145e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_B_GT1	0x0D0B /* Reserved */
146e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_B_GT2	0x0D1B
147e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_B_GT3	0x0D2B
148e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_E_GT1	0x0D0E /* Reserved */
149e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_E_GT2	0x0D1E
150e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_E_GT3	0x0D2E
151e88f27b3Smrg#define BDW_SPARE			0x2
152e88f27b3Smrg#define BDW_ULT				0x6
153e88f27b3Smrg#define BDW_SERVER			0xa
154e88f27b3Smrg#define BDW_IRIS			0xb
155e88f27b3Smrg#define BDW_WORKSTATION			0xd
156e88f27b3Smrg#define BDW_ULX				0xe
157e88f27b3Smrg
158e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_PO		0x0f30 /* VLV PO board */
159e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_1		0x0f31
160e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_2		0x0f32
161e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_3		0x0f33
162e88f27b3Smrg
163857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_0		0x22b0
164857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_1		0x22b1
165857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_2		0x22b2
166857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_3		0x22b3
167857b0bc6Smrg
1683f012e29Smrg#define PCI_CHIP_SKYLAKE_DT_GT1		0x1902
16908d7334dSsnj#define PCI_CHIP_SKYLAKE_ULT_GT1	0x1906
1703f012e29Smrg#define PCI_CHIP_SKYLAKE_SRV_GT1	0x190A /* Reserved */
1713f012e29Smrg#define PCI_CHIP_SKYLAKE_H_GT1		0x190B
1723f012e29Smrg#define PCI_CHIP_SKYLAKE_ULX_GT1	0x190E /* Reserved */
17308d7334dSsnj#define PCI_CHIP_SKYLAKE_DT_GT2		0x1912
1743f012e29Smrg#define PCI_CHIP_SKYLAKE_FUSED0_GT2	0x1913 /* Reserved */
1753f012e29Smrg#define PCI_CHIP_SKYLAKE_FUSED1_GT2	0x1915 /* Reserved */
1763f012e29Smrg#define PCI_CHIP_SKYLAKE_ULT_GT2	0x1916
1773f012e29Smrg#define PCI_CHIP_SKYLAKE_FUSED2_GT2	0x1917 /* Reserved */
1783f012e29Smrg#define PCI_CHIP_SKYLAKE_SRV_GT2	0x191A /* Reserved */
17908d7334dSsnj#define PCI_CHIP_SKYLAKE_HALO_GT2	0x191B
18008d7334dSsnj#define PCI_CHIP_SKYLAKE_WKS_GT2 	0x191D
1813f012e29Smrg#define PCI_CHIP_SKYLAKE_ULX_GT2	0x191E
1823f012e29Smrg#define PCI_CHIP_SKYLAKE_MOBILE_GT2	0x1921 /* Reserved */
1833f012e29Smrg#define PCI_CHIP_SKYLAKE_ULT_GT3_0	0x1923
1843f012e29Smrg#define PCI_CHIP_SKYLAKE_ULT_GT3_1	0x1926
1853f012e29Smrg#define PCI_CHIP_SKYLAKE_ULT_GT3_2	0x1927
1863f012e29Smrg#define PCI_CHIP_SKYLAKE_SRV_GT4	0x192A
1873f012e29Smrg#define PCI_CHIP_SKYLAKE_HALO_GT3	0x192B /* Reserved */
1883f012e29Smrg#define PCI_CHIP_SKYLAKE_SRV_GT3	0x192D
1893f012e29Smrg#define PCI_CHIP_SKYLAKE_DT_GT4		0x1932
1903f012e29Smrg#define PCI_CHIP_SKYLAKE_SRV_GT4X	0x193A
1913f012e29Smrg#define PCI_CHIP_SKYLAKE_H_GT4		0x193B
1923f012e29Smrg#define PCI_CHIP_SKYLAKE_WKS_GT4	0x193D
1933f012e29Smrg
1943f012e29Smrg#define PCI_CHIP_KABYLAKE_ULT_GT2	0x5916
1953f012e29Smrg#define PCI_CHIP_KABYLAKE_ULT_GT1_5	0x5913
1963f012e29Smrg#define PCI_CHIP_KABYLAKE_ULT_GT1	0x5906
1973f012e29Smrg#define PCI_CHIP_KABYLAKE_ULT_GT3_0	0x5923
1983f012e29Smrg#define PCI_CHIP_KABYLAKE_ULT_GT3_1	0x5926
1993f012e29Smrg#define PCI_CHIP_KABYLAKE_ULT_GT3_2	0x5927
2003f012e29Smrg#define PCI_CHIP_KABYLAKE_ULT_GT2F	0x5921
2013f012e29Smrg#define PCI_CHIP_KABYLAKE_ULX_GT1_5	0x5915
2023f012e29Smrg#define PCI_CHIP_KABYLAKE_ULX_GT1	0x590E
2033f012e29Smrg#define PCI_CHIP_KABYLAKE_ULX_GT2	0x591E
2043f012e29Smrg#define PCI_CHIP_KABYLAKE_DT_GT2	0x5912
2053f012e29Smrg#define PCI_CHIP_KABYLAKE_DT_GT1_5	0x5917
2063f012e29Smrg#define PCI_CHIP_KABYLAKE_DT_GT1	0x5902
2073f012e29Smrg#define PCI_CHIP_KABYLAKE_HALO_GT2	0x591B
2083f012e29Smrg#define PCI_CHIP_KABYLAKE_HALO_GT4	0x593B
2093f012e29Smrg#define PCI_CHIP_KABYLAKE_HALO_GT1_0	0x5908
2103f012e29Smrg#define PCI_CHIP_KABYLAKE_HALO_GT1_1	0x590B
2113f012e29Smrg#define PCI_CHIP_KABYLAKE_SRV_GT2	0x591A
2123f012e29Smrg#define PCI_CHIP_KABYLAKE_SRV_GT1	0x590A
2133f012e29Smrg#define PCI_CHIP_KABYLAKE_WKS_GT2	0x591D
21408d7334dSsnj
215e6188e58Smrg#define PCI_CHIP_BROXTON_0		0x0A84
216e6188e58Smrg#define PCI_CHIP_BROXTON_1		0x1A84
217e6188e58Smrg#define PCI_CHIP_BROXTON_2		0x5A84
2183f012e29Smrg#define PCI_CHIP_BROXTON_3		0x1A85
2193f012e29Smrg#define PCI_CHIP_BROXTON_4		0x5A85
220e6188e58Smrg
221e88f27b3Smrg#define IS_MOBILE(devid)	((devid) == PCI_CHIP_I855_GM || \
222e88f27b3Smrg				 (devid) == PCI_CHIP_I915_GM || \
223e88f27b3Smrg				 (devid) == PCI_CHIP_I945_GM || \
224e88f27b3Smrg				 (devid) == PCI_CHIP_I945_GME || \
225e88f27b3Smrg				 (devid) == PCI_CHIP_I965_GM || \
226e88f27b3Smrg				 (devid) == PCI_CHIP_I965_GME || \
227e88f27b3Smrg				 (devid) == PCI_CHIP_GM45_GM || IS_IGD(devid) || \
228e88f27b3Smrg				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT1 || \
229e88f27b3Smrg				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT2)
230e88f27b3Smrg
231e88f27b3Smrg#define IS_G45(devid)		((devid) == PCI_CHIP_IGD_E_G || \
232e88f27b3Smrg				 (devid) == PCI_CHIP_Q45_G || \
233e88f27b3Smrg				 (devid) == PCI_CHIP_G45_G || \
234e88f27b3Smrg				 (devid) == PCI_CHIP_G41_G)
235e88f27b3Smrg#define IS_GM45(devid)		((devid) == PCI_CHIP_GM45_GM)
236e88f27b3Smrg#define IS_G4X(devid)		(IS_G45(devid) || IS_GM45(devid))
237e88f27b3Smrg
238e88f27b3Smrg#define IS_ILD(devid)		((devid) == PCI_CHIP_ILD_G)
239e88f27b3Smrg#define IS_ILM(devid)		((devid) == PCI_CHIP_ILM_G)
240e88f27b3Smrg
241e88f27b3Smrg#define IS_915(devid)		((devid) == PCI_CHIP_I915_G || \
242e88f27b3Smrg				 (devid) == PCI_CHIP_E7221_G || \
243e88f27b3Smrg				 (devid) == PCI_CHIP_I915_GM)
244e88f27b3Smrg
245e88f27b3Smrg#define IS_945GM(devid)		((devid) == PCI_CHIP_I945_GM || \
246e88f27b3Smrg				 (devid) == PCI_CHIP_I945_GME)
247e88f27b3Smrg
248e88f27b3Smrg#define IS_945(devid)		((devid) == PCI_CHIP_I945_G || \
249e88f27b3Smrg				 (devid) == PCI_CHIP_I945_GM || \
250e88f27b3Smrg				 (devid) == PCI_CHIP_I945_GME || \
251e88f27b3Smrg				 IS_G33(devid))
252e88f27b3Smrg
253e88f27b3Smrg#define IS_G33(devid)		((devid) == PCI_CHIP_G33_G || \
254e88f27b3Smrg				 (devid) == PCI_CHIP_Q33_G || \
255e88f27b3Smrg				 (devid) == PCI_CHIP_Q35_G || IS_IGD(devid))
256e88f27b3Smrg
257e88f27b3Smrg#define IS_GEN2(devid)		((devid) == PCI_CHIP_I830_M || \
258e88f27b3Smrg				 (devid) == PCI_CHIP_845_G || \
259e88f27b3Smrg				 (devid) == PCI_CHIP_I855_GM || \
260e88f27b3Smrg				 (devid) == PCI_CHIP_I865_G)
261e88f27b3Smrg
262e88f27b3Smrg#define IS_GEN3(devid)		(IS_945(devid) || IS_915(devid))
263e88f27b3Smrg
264e88f27b3Smrg#define IS_GEN4(devid)		((devid) == PCI_CHIP_I965_G || \
265e88f27b3Smrg				 (devid) == PCI_CHIP_I965_Q || \
266e88f27b3Smrg				 (devid) == PCI_CHIP_I965_G_1 || \
267e88f27b3Smrg				 (devid) == PCI_CHIP_I965_GM || \
268e88f27b3Smrg				 (devid) == PCI_CHIP_I965_GME || \
269e88f27b3Smrg				 (devid) == PCI_CHIP_I946_GZ || \
270e88f27b3Smrg				 IS_G4X(devid))
271e88f27b3Smrg
272e88f27b3Smrg#define IS_GEN5(devid)		(IS_ILD(devid) || IS_ILM(devid))
273e88f27b3Smrg
274e88f27b3Smrg#define IS_GEN6(devid)		((devid) == PCI_CHIP_SANDYBRIDGE_GT1 || \
275e88f27b3Smrg				 (devid) == PCI_CHIP_SANDYBRIDGE_GT2 || \
276e88f27b3Smrg				 (devid) == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \
277e88f27b3Smrg				 (devid) == PCI_CHIP_SANDYBRIDGE_M_GT1 || \
278e88f27b3Smrg				 (devid) == PCI_CHIP_SANDYBRIDGE_M_GT2 || \
279e88f27b3Smrg				 (devid) == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS || \
280e88f27b3Smrg				 (devid) == PCI_CHIP_SANDYBRIDGE_S)
281e88f27b3Smrg
282e88f27b3Smrg#define IS_GEN7(devid)		(IS_IVYBRIDGE(devid) || \
283e88f27b3Smrg				 IS_HASWELL(devid) || \
284e88f27b3Smrg				 IS_VALLEYVIEW(devid))
285e88f27b3Smrg
286e88f27b3Smrg#define IS_IVYBRIDGE(devid)	((devid) == PCI_CHIP_IVYBRIDGE_GT1 || \
287e88f27b3Smrg				 (devid) == PCI_CHIP_IVYBRIDGE_GT2 || \
288e88f27b3Smrg				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT1 || \
289e88f27b3Smrg				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT2 || \
290e88f27b3Smrg				 (devid) == PCI_CHIP_IVYBRIDGE_S || \
291e88f27b3Smrg				 (devid) == PCI_CHIP_IVYBRIDGE_S_GT2)
292e88f27b3Smrg
293e88f27b3Smrg#define IS_VALLEYVIEW(devid)	((devid) == PCI_CHIP_VALLEYVIEW_PO || \
294e88f27b3Smrg				 (devid) == PCI_CHIP_VALLEYVIEW_1 || \
295e88f27b3Smrg				 (devid) == PCI_CHIP_VALLEYVIEW_2 || \
296e88f27b3Smrg				 (devid) == PCI_CHIP_VALLEYVIEW_3)
297e88f27b3Smrg
298e88f27b3Smrg#define IS_HSW_GT1(devid)	((devid) == PCI_CHIP_HASWELL_GT1 || \
299e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_M_GT1 || \
300e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_S_GT1 || \
301e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_B_GT1 || \
302e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_E_GT1 || \
303e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_GT1 || \
304e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_M_GT1 || \
305e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_S_GT1 || \
306e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_B_GT1 || \
307e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_E_GT1 || \
308e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_GT1 || \
309e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_M_GT1 || \
310e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_S_GT1 || \
311e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_B_GT1 || \
312e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_E_GT1 || \
313e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_GT1 || \
314e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_M_GT1 || \
315e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_S_GT1 || \
316e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_B_GT1 || \
317e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_E_GT1)
318e88f27b3Smrg#define IS_HSW_GT2(devid)	((devid) == PCI_CHIP_HASWELL_GT2 || \
319e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_M_GT2 || \
320e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_S_GT2 || \
321e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_B_GT2 || \
322e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_E_GT2 || \
323e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_GT2 || \
324e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_M_GT2 || \
325e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_S_GT2 || \
326e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_B_GT2 || \
327e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_E_GT2 || \
328e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_GT2 || \
329e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_M_GT2 || \
330e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_S_GT2 || \
331e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_B_GT2 || \
332e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_E_GT2 || \
333e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_GT2 || \
334e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_M_GT2 || \
335e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_S_GT2 || \
336e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_B_GT2 || \
337e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_E_GT2)
338e88f27b3Smrg#define IS_HSW_GT3(devid)	((devid) == PCI_CHIP_HASWELL_GT3 || \
339e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_M_GT3 || \
340e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_S_GT3 || \
341e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_B_GT3 || \
342e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_E_GT3 || \
343e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_GT3 || \
344e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_M_GT3 || \
345e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_S_GT3 || \
346e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_B_GT3 || \
347e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_SDV_E_GT3 || \
348e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_GT3 || \
349e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_M_GT3 || \
350e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_S_GT3 || \
351e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_B_GT3 || \
352e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_ULT_E_GT3 || \
353e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_GT3 || \
354e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_M_GT3 || \
355e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_S_GT3 || \
356e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_B_GT3 || \
357e88f27b3Smrg				 (devid) == PCI_CHIP_HASWELL_CRW_E_GT3)
358e88f27b3Smrg
359e88f27b3Smrg#define IS_HASWELL(devid)	(IS_HSW_GT1(devid) || \
360e88f27b3Smrg				 IS_HSW_GT2(devid) || \
361e88f27b3Smrg				 IS_HSW_GT3(devid))
362e88f27b3Smrg
363e88f27b3Smrg#define IS_BROADWELL(devid)     (((devid & 0xff00) != 0x1600) ? 0 : \
364e88f27b3Smrg				(((devid & 0x00f0) >> 4) > 3) ? 0 : \
365e88f27b3Smrg				((devid & 0x000f) == BDW_SPARE) ? 1 : \
366e88f27b3Smrg				((devid & 0x000f) == BDW_ULT) ? 1 : \
367e88f27b3Smrg				((devid & 0x000f) == BDW_IRIS) ? 1 : \
368e88f27b3Smrg				((devid & 0x000f) == BDW_SERVER) ? 1 : \
369e88f27b3Smrg				((devid & 0x000f) == BDW_WORKSTATION) ? 1 : \
370e88f27b3Smrg				((devid & 0x000f) == BDW_ULX) ? 1 : 0)
371e88f27b3Smrg
372857b0bc6Smrg#define IS_CHERRYVIEW(devid)	((devid) == PCI_CHIP_CHERRYVIEW_0 || \
373857b0bc6Smrg				 (devid) == PCI_CHIP_CHERRYVIEW_1 || \
374857b0bc6Smrg				 (devid) == PCI_CHIP_CHERRYVIEW_2 || \
375857b0bc6Smrg				 (devid) == PCI_CHIP_CHERRYVIEW_3)
376e88f27b3Smrg
377857b0bc6Smrg#define IS_GEN8(devid)		(IS_BROADWELL(devid) || \
378857b0bc6Smrg				 IS_CHERRYVIEW(devid))
379e88f27b3Smrg
3803f012e29Smrg#define IS_SKL_GT1(devid)	((devid) == PCI_CHIP_SKYLAKE_DT_GT1	|| \
3813f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_ULT_GT1	|| \
3823f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_SRV_GT1	|| \
3833f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_H_GT1	|| \
3843f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_ULX_GT1)
3853f012e29Smrg
3863f012e29Smrg#define IS_SKL_GT2(devid)	((devid) == PCI_CHIP_SKYLAKE_DT_GT2	|| \
3873f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_FUSED0_GT2	|| \
3883f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_FUSED1_GT2	|| \
3893f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_ULT_GT2	|| \
3903f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_FUSED2_GT2	|| \
39108d7334dSsnj				 (devid) == PCI_CHIP_SKYLAKE_SRV_GT2	|| \
3923f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_HALO_GT2	|| \
3933f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_WKS_GT2	|| \
3943f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_ULX_GT2	|| \
3953f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_MOBILE_GT2)
39608d7334dSsnj
3973f012e29Smrg#define IS_SKL_GT3(devid)	((devid) == PCI_CHIP_SKYLAKE_ULT_GT3_0	|| \
3983f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_ULT_GT3_1	|| \
3993f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_ULT_GT3_2	|| \
40008d7334dSsnj				 (devid) == PCI_CHIP_SKYLAKE_HALO_GT3	|| \
40108d7334dSsnj				 (devid) == PCI_CHIP_SKYLAKE_SRV_GT3)
40208d7334dSsnj
4033f012e29Smrg#define IS_SKL_GT4(devid)	((devid) == PCI_CHIP_SKYLAKE_SRV_GT4	|| \
4043f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_DT_GT4	|| \
4053f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_SRV_GT4X	|| \
4063f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_H_GT4	|| \
4073f012e29Smrg				 (devid) == PCI_CHIP_SKYLAKE_WKS_GT4)
4083f012e29Smrg
4093f012e29Smrg#define IS_KBL_GT1(devid)	((devid) == PCI_CHIP_KABYLAKE_ULT_GT1_5	|| \
4103f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_ULX_GT1_5	|| \
4113f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_DT_GT1_5	|| \
4123f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_ULT_GT1	|| \
4133f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_ULX_GT1	|| \
4143f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_DT_GT1	|| \
4153f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_HALO_GT1_0 || \
4163f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_HALO_GT1_1 || \
4173f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_SRV_GT1)
4183f012e29Smrg
4193f012e29Smrg#define IS_KBL_GT2(devid)	((devid) == PCI_CHIP_KABYLAKE_ULT_GT2	|| \
4203f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_ULT_GT2F	|| \
4213f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_ULX_GT2	|| \
4223f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_DT_GT2	|| \
4233f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_HALO_GT2	|| \
4243f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_SRV_GT2	|| \
4253f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_WKS_GT2)
4263f012e29Smrg
4273f012e29Smrg#define IS_KBL_GT3(devid)	((devid) == PCI_CHIP_KABYLAKE_ULT_GT3_0	|| \
4283f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_ULT_GT3_1	|| \
4293f012e29Smrg				 (devid) == PCI_CHIP_KABYLAKE_ULT_GT3_2)
4303f012e29Smrg
4313f012e29Smrg#define IS_KBL_GT4(devid)	((devid) == PCI_CHIP_KABYLAKE_HALO_GT4)
4323f012e29Smrg
4333f012e29Smrg#define IS_KABYLAKE(devid)	(IS_KBL_GT1(devid) || \
4343f012e29Smrg				 IS_KBL_GT2(devid) || \
4353f012e29Smrg				 IS_KBL_GT3(devid) || \
4363f012e29Smrg				 IS_KBL_GT4(devid))
4373f012e29Smrg
43808d7334dSsnj#define IS_SKYLAKE(devid)	(IS_SKL_GT1(devid) || \
43908d7334dSsnj				 IS_SKL_GT2(devid) || \
4403f012e29Smrg				 IS_SKL_GT3(devid) || \
4413f012e29Smrg				 IS_SKL_GT4(devid))
44208d7334dSsnj
443e6188e58Smrg#define IS_BROXTON(devid)	((devid) == PCI_CHIP_BROXTON_0	|| \
444e6188e58Smrg				 (devid) == PCI_CHIP_BROXTON_1	|| \
4453f012e29Smrg				 (devid) == PCI_CHIP_BROXTON_2	|| \
4463f012e29Smrg				 (devid) == PCI_CHIP_BROXTON_3	|| \
4473f012e29Smrg				 (devid) == PCI_CHIP_BROXTON_4)
448e6188e58Smrg
449e6188e58Smrg#define IS_GEN9(devid)		(IS_SKYLAKE(devid) || \
4503f012e29Smrg				 IS_BROXTON(devid) || \
4513f012e29Smrg				 IS_KABYLAKE(devid))
45208d7334dSsnj
453e88f27b3Smrg#define IS_9XX(dev)		(IS_GEN3(dev) || \
454e88f27b3Smrg				 IS_GEN4(dev) || \
455e88f27b3Smrg				 IS_GEN5(dev) || \
456e88f27b3Smrg				 IS_GEN6(dev) || \
457e88f27b3Smrg				 IS_GEN7(dev) || \
45808d7334dSsnj				 IS_GEN8(dev) || \
45908d7334dSsnj				 IS_GEN9(dev))
460e88f27b3Smrg
46122944501Smrg
46222944501Smrg#endif /* _INTEL_CHIPSET_H */
463