nvc0.c 17.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 * Copyright 2012 Red Hat Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Ben Skeggs
 */

25
#include <subdev/bios.h>
26
#include <subdev/bus.h>
27
#include <subdev/gpio.h>
28
#include <subdev/i2c.h>
29
#include <subdev/fuse.h>
30
#include <subdev/clk.h>
31
#include <subdev/therm.h>
32
#include <subdev/mxm.h>
33
#include <subdev/devinit.h>
34
#include <subdev/mc.h>
35
#include <subdev/timer.h>
36
#include <subdev/fb.h>
37
#include <subdev/ltc.h>
38
#include <subdev/ibus.h>
39
#include <subdev/instmem.h>
40
#include <subdev/mmu.h>
41
#include <subdev/bar.h>
42
#include <subdev/pmu.h>
43
#include <subdev/volt.h>
44

45
#include <engine/device.h>
46 47 48 49 50 51 52 53 54
#include <engine/dmaobj.h>
#include <engine/fifo.h>
#include <engine/software.h>
#include <engine/graph.h>
#include <engine/vp.h>
#include <engine/bsp.h>
#include <engine/ppp.h>
#include <engine/copy.h>
#include <engine/disp.h>
55
#include <engine/perfmon.h>
56

57 58 59 60 61
int
nvc0_identify(struct nouveau_device *device)
{
	switch (device->chipset) {
	case 0xc0:
62
		device->cname = "GF100";
63
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
64
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv94_gpio_oclass;
65
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
66
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
67
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
68
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
69
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
70
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
71
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc0_mc_oclass;
72
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
73
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
74
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
75
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
76
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
77
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
78
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
79
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
80
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvc0_pmu_oclass;
81
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
82
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvc0_dmaeng_oclass;
83
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
84
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
85
		device->oclass[NVDEV_ENGINE_GR     ] =  nvc0_graph_oclass;
86
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
87
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
88
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
89 90
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
		device->oclass[NVDEV_ENGINE_COPY1  ] = &nvc0_copy1_oclass;
91
		device->oclass[NVDEV_ENGINE_DISP   ] =  nva3_disp_oclass;
92
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
93 94
		break;
	case 0xc4:
95
		device->cname = "GF104";
96
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
97
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv94_gpio_oclass;
98
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
99
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
100
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
101
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
102
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
103
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
104
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc0_mc_oclass;
105
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
106
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
107
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
108
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
109
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
110
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
111
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
112
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
113
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvc0_pmu_oclass;
114
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
115
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvc0_dmaeng_oclass;
116
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
117
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
118
		device->oclass[NVDEV_ENGINE_GR     ] =  nvc4_graph_oclass;
119
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
120
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
121
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
122 123
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
		device->oclass[NVDEV_ENGINE_COPY1  ] = &nvc0_copy1_oclass;
124
		device->oclass[NVDEV_ENGINE_DISP   ] =  nva3_disp_oclass;
125
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
126 127
		break;
	case 0xc3:
128
		device->cname = "GF106";
129
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
130
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv94_gpio_oclass;
131
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
132
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
133
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
134
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
135
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
136
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
137
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc3_mc_oclass;
138
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
139
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
140
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
141
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
142
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
143
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
144
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
145
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
146
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvc0_pmu_oclass;
147
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
148
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvc0_dmaeng_oclass;
149
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
150
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
151
		device->oclass[NVDEV_ENGINE_GR     ] =  nvc4_graph_oclass;
152
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
153
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
154
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
155
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
156
		device->oclass[NVDEV_ENGINE_DISP   ] =  nva3_disp_oclass;
157
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
158 159
		break;
	case 0xce:
160
		device->cname = "GF114";
161
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
162
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv94_gpio_oclass;
163
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
164
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
165
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
166
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
167
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
168
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
S
Sid Boyce 已提交
169
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc0_mc_oclass;
170
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
171
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
172
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
173
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
174
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
175
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
176
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
177
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
178
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvc0_pmu_oclass;
179
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
180
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvc0_dmaeng_oclass;
181
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
182
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
183
		device->oclass[NVDEV_ENGINE_GR     ] =  nvc4_graph_oclass;
184
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
185
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
186
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
187 188
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
		device->oclass[NVDEV_ENGINE_COPY1  ] = &nvc0_copy1_oclass;
189
		device->oclass[NVDEV_ENGINE_DISP   ] =  nva3_disp_oclass;
190
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
191 192
		break;
	case 0xcf:
193
		device->cname = "GF116";
194
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
195
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv94_gpio_oclass;
196
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
197
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
198
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
199
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
200
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
201
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
202
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc3_mc_oclass;
203
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
204
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
205
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
206
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
207
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
208
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
209
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
210
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
211
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvc0_pmu_oclass;
212
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
213
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvc0_dmaeng_oclass;
214
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
215
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
216
		device->oclass[NVDEV_ENGINE_GR     ] =  nvc4_graph_oclass;
217
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
218
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
219
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
220
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
221
		device->oclass[NVDEV_ENGINE_DISP   ] =  nva3_disp_oclass;
222
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
223 224
		break;
	case 0xc1:
225
		device->cname = "GF108";
226
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
227
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv94_gpio_oclass;
228
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
229
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
230
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
231
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
232
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
233
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
234
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc3_mc_oclass;
235
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
236
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
237
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
238
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
239
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
240
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
241
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
242
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
243
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvc0_pmu_oclass;
244
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
245
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvc0_dmaeng_oclass;
246
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
247
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
248
		device->oclass[NVDEV_ENGINE_GR     ] =  nvc1_graph_oclass;
249
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
250
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
251
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
252
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
253
		device->oclass[NVDEV_ENGINE_DISP   ] =  nva3_disp_oclass;
254
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
255 256
		break;
	case 0xc8:
257
		device->cname = "GF110";
258
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
259
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv94_gpio_oclass;
260
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nv94_i2c_oclass;
261
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
262
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
263
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nva3_therm_oclass;
264
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
265
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
266
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc0_mc_oclass;
267
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
268
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
269
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
270
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
271
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
272
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
273
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
274
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
275
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvc0_pmu_oclass;
276
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
277
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvc0_dmaeng_oclass;
278
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
279
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
280
		device->oclass[NVDEV_ENGINE_GR     ] =  nvc8_graph_oclass;
281
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
282
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
283
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
284 285
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
		device->oclass[NVDEV_ENGINE_COPY1  ] = &nvc0_copy1_oclass;
286
		device->oclass[NVDEV_ENGINE_DISP   ] =  nva3_disp_oclass;
287
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
288 289
		break;
	case 0xd9:
290
		device->cname = "GF119";
291
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
292
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nvd0_gpio_oclass;
293
		device->oclass[NVDEV_SUBDEV_I2C    ] =  nvd0_i2c_oclass;
294
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
295
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
296
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
297
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
298
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
299
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc3_mc_oclass;
300
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
301
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
302
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
303
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
304
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
305
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
306
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
307
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
308
		device->oclass[NVDEV_SUBDEV_PMU    ] =  nvd0_pmu_oclass;
309
		device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
310
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvd0_dmaeng_oclass;
311
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
312
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
313
		device->oclass[NVDEV_ENGINE_GR     ] =  nvd9_graph_oclass;
314 315 316 317
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
318
		device->oclass[NVDEV_ENGINE_DISP   ] =  nvd0_disp_oclass;
319
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
320 321 322 323
		break;
	case 0xd7:
		device->cname = "GF117";
		device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
324
		device->oclass[NVDEV_SUBDEV_GPIO   ] =  nvd0_gpio_oclass;
325
		device->oclass[NVDEV_SUBDEV_I2C    ] =  gf117_i2c_oclass;
326
		device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
327
		device->oclass[NVDEV_SUBDEV_CLK    ] = &nvc0_clk_oclass;
328 329
		device->oclass[NVDEV_SUBDEV_THERM  ] = &nvd0_therm_oclass;
		device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
330
		device->oclass[NVDEV_SUBDEV_DEVINIT] =  nvc0_devinit_oclass;
331
		device->oclass[NVDEV_SUBDEV_MC     ] =  nvc3_mc_oclass;
332
		device->oclass[NVDEV_SUBDEV_BUS    ] =  nvc0_bus_oclass;
333
		device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
334
		device->oclass[NVDEV_SUBDEV_FB     ] =  nvc0_fb_oclass;
335
		device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
336
		device->oclass[NVDEV_SUBDEV_IBUS   ] = &nvc0_ibus_oclass;
337
		device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
338
		device->oclass[NVDEV_SUBDEV_MMU    ] = &nvc0_mmu_oclass;
339
		device->oclass[NVDEV_SUBDEV_BAR    ] = &nvc0_bar_oclass;
340
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  nvd0_dmaeng_oclass;
341
		device->oclass[NVDEV_ENGINE_FIFO   ] =  nvc0_fifo_oclass;
342
		device->oclass[NVDEV_ENGINE_SW     ] =  nvc0_software_oclass;
M
Maarten Lankhorst 已提交
343
		device->oclass[NVDEV_ENGINE_GR     ] =  nvd7_graph_oclass;
344
		device->oclass[NVDEV_ENGINE_VP     ] = &nvc0_vp_oclass;
345
		device->oclass[NVDEV_ENGINE_BSP    ] = &nvc0_bsp_oclass;
346
		device->oclass[NVDEV_ENGINE_PPP    ] = &nvc0_ppp_oclass;
347
		device->oclass[NVDEV_ENGINE_COPY0  ] = &nvc0_copy0_oclass;
348
		device->oclass[NVDEV_ENGINE_DISP   ] =  nvd0_disp_oclass;
349
		device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
350 351 352 353 354 355 356
		break;
	default:
		nv_fatal(device, "unknown Fermi chipset\n");
		return -EINVAL;
	}

	return 0;
357
	}