aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/i2c_.fuc393
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/macros.fuc53
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc3
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc.h443
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc3
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc.h458
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc3
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc.h458
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc3
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc.h509
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/os.h19
11 files changed, 2066 insertions, 279 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/i2c_.fuc b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/i2c_.fuc
new file mode 100644
index 000000000000..757dda700024
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/i2c_.fuc
@@ -0,0 +1,393 @@
1/*
2 * Copyright 2013 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Authors: Ben Skeggs
23 */
24
25#define T_TIMEOUT 2200000
26#define T_RISEFALL 1000
27#define T_HOLD 5000
28
29#ifdef INCLUDE_PROC
30process(PROC_I2C_, #i2c_init, #i2c_recv)
31#endif
32
33/******************************************************************************
34 * I2C_ data segment
35 *****************************************************************************/
36#ifdef INCLUDE_DATA
37i2c_scl_map:
38.b32 NV_PPWR_OUTPUT_I2C_0_SCL
39.b32 NV_PPWR_OUTPUT_I2C_1_SCL
40.b32 NV_PPWR_OUTPUT_I2C_2_SCL
41.b32 NV_PPWR_OUTPUT_I2C_3_SCL
42.b32 NV_PPWR_OUTPUT_I2C_4_SCL
43.b32 NV_PPWR_OUTPUT_I2C_5_SCL
44.b32 NV_PPWR_OUTPUT_I2C_6_SCL
45.b32 NV_PPWR_OUTPUT_I2C_7_SCL
46.b32 NV_PPWR_OUTPUT_I2C_8_SCL
47.b32 NV_PPWR_OUTPUT_I2C_9_SCL
48i2c_sda_map:
49.b32 NV_PPWR_OUTPUT_I2C_0_SDA
50.b32 NV_PPWR_OUTPUT_I2C_1_SDA
51.b32 NV_PPWR_OUTPUT_I2C_2_SDA
52.b32 NV_PPWR_OUTPUT_I2C_3_SDA
53.b32 NV_PPWR_OUTPUT_I2C_4_SDA
54.b32 NV_PPWR_OUTPUT_I2C_5_SDA
55.b32 NV_PPWR_OUTPUT_I2C_6_SDA
56.b32 NV_PPWR_OUTPUT_I2C_7_SDA
57.b32 NV_PPWR_OUTPUT_I2C_8_SDA
58.b32 NV_PPWR_OUTPUT_I2C_9_SDA
59#if NVKM_PPWR_CHIPSET < GF119
60i2c_ctrl:
61.b32 0x00e138
62.b32 0x00e150
63.b32 0x00e168
64.b32 0x00e180
65.b32 0x00e254
66.b32 0x00e274
67.b32 0x00e764
68.b32 0x00e780
69.b32 0x00e79c
70.b32 0x00e7b8
71#endif
72#endif
73
74/******************************************************************************
75 * I2C_ code segment
76 *****************************************************************************/
77#ifdef INCLUDE_CODE
78
79// $r3 - value
80// $r2 - sda line
81// $r1 - scl line
82// $r0 - zero
83i2c_drive_scl:
84 cmp b32 $r3 0
85 bra e #i2c_drive_scl_lo
86 nv_iowr(NV_PPWR_OUTPUT_SET, $r1)
87 ret
88 i2c_drive_scl_lo:
89 nv_iowr(NV_PPWR_OUTPUT_CLR, $r1)
90 ret
91
92i2c_drive_sda:
93 cmp b32 $r3 0
94 bra e #i2c_drive_sda_lo
95 nv_iowr(NV_PPWR_OUTPUT_SET, $r2)
96 ret
97 i2c_drive_sda_lo:
98 nv_iowr(NV_PPWR_OUTPUT_CLR, $r2)
99 ret
100
101i2c_sense_scl:
102 bclr $flags $p1
103 nv_iord($r3, NV_PPWR_INPUT)
104 and $r3 $r1
105 bra z #i2c_sense_scl_done
106 bset $flags $p1
107 i2c_sense_scl_done:
108 ret
109
110i2c_sense_sda:
111 bclr $flags $p1
112 nv_iord($r3, NV_PPWR_INPUT)
113 and $r3 $r2
114 bra z #i2c_sense_sda_done
115 bset $flags $p1
116 i2c_sense_sda_done:
117 ret
118
119#define i2c_drive_scl(v) /*
120*/ mov $r3 (v) /*
121*/ call(i2c_drive_scl)
122#define i2c_drive_sda(v) /*
123*/ mov $r3 (v) /*
124*/ call(i2c_drive_sda)
125#define i2c_sense_scl() /*
126*/ call(i2c_sense_scl)
127#define i2c_sense_sda() /*
128*/ call(i2c_sense_sda)
129#define i2c_delay(v) /*
130*/ mov $r14 (v) /*
131*/ call(nsec)
132
133#define i2c_trace_init() /*
134*/ imm32($r6, 0x10000000) /*
135*/ sub b32 $r7 $r6 1 /*
136*/
137#define i2c_trace_down() /*
138*/ shr b32 $r6 4 /*
139*/ push $r5 /*
140*/ shl b32 $r5 $r6 4 /*
141*/ sub b32 $r5 $r6 /*
142*/ not b32 $r5 /*
143*/ and $r7 $r5 /*
144*/ pop $r5 /*
145*/
146#define i2c_trace_exit() /*
147*/ shl b32 $r6 4 /*
148*/
149#define i2c_trace_next() /*
150*/ add b32 $r7 $r6 /*
151*/
152#define i2c_trace_call(func) /*
153*/ i2c_trace_next() /*
154*/ i2c_trace_down() /*
155*/ call(func) /*
156*/ i2c_trace_exit() /*
157*/
158
159i2c_raise_scl:
160 push $r4
161 mov $r4 (T_TIMEOUT / T_RISEFALL)
162 i2c_drive_scl(1)
163 i2c_raise_scl_wait:
164 i2c_delay(T_RISEFALL)
165 i2c_sense_scl()
166 bra $p1 #i2c_raise_scl_done
167 sub b32 $r4 1
168 bra nz #i2c_raise_scl_wait
169 i2c_raise_scl_done:
170 pop $r4
171 ret
172
173i2c_start:
174 i2c_sense_scl()
175 bra not $p1 #i2c_start_rep
176 i2c_sense_sda()
177 bra not $p1 #i2c_start_rep
178 bra #i2c_start_send
179 i2c_start_rep:
180 i2c_drive_scl(0)
181 i2c_drive_sda(1)
182 i2c_trace_call(i2c_raise_scl)
183 bra not $p1 #i2c_start_out
184 i2c_start_send:
185 i2c_drive_sda(0)
186 i2c_delay(T_HOLD)
187 i2c_drive_scl(0)
188 i2c_delay(T_HOLD)
189 i2c_start_out:
190 ret
191
192i2c_stop:
193 i2c_drive_scl(0)
194 i2c_drive_sda(0)
195 i2c_delay(T_RISEFALL)
196 i2c_drive_scl(1)
197 i2c_delay(T_HOLD)
198 i2c_drive_sda(1)
199 i2c_delay(T_HOLD)
200 ret
201
202// $r3 - value
203// $r2 - sda line
204// $r1 - scl line
205// $r0 - zero
206i2c_bitw:
207 call(i2c_drive_sda)
208 i2c_delay(T_RISEFALL)
209 i2c_trace_call(i2c_raise_scl)
210 bra not $p1 #i2c_bitw_out
211 i2c_delay(T_HOLD)
212 i2c_drive_scl(0)
213 i2c_delay(T_HOLD)
214 i2c_bitw_out:
215 ret
216
217// $r3 - value (out)
218// $r2 - sda line
219// $r1 - scl line
220// $r0 - zero
221i2c_bitr:
222 i2c_drive_sda(1)
223 i2c_delay(T_RISEFALL)
224 i2c_trace_call(i2c_raise_scl)
225 bra not $p1 #i2c_bitr_done
226 i2c_sense_sda()
227 i2c_drive_scl(0)
228 i2c_delay(T_HOLD)
229 xbit $r3 $flags $p1
230 bset $flags $p1
231 i2c_bitr_done:
232 ret
233
234i2c_get_byte:
235 mov $r5 0
236 mov $r4 8
237 i2c_get_byte_next:
238 shl b32 $r5 1
239 i2c_trace_call(i2c_bitr)
240 bra not $p1 #i2c_get_byte_done
241 or $r5 $r3
242 sub b32 $r4 1
243 bra nz #i2c_get_byte_next
244 mov $r3 1
245 i2c_trace_call(i2c_bitw)
246 i2c_get_byte_done:
247 ret
248
249i2c_put_byte:
250 mov $r4 8
251 i2c_put_byte_next:
252 sub b32 $r4 1
253 xbit $r3 $r5 $r4
254 i2c_trace_call(i2c_bitw)
255 bra not $p1 #i2c_put_byte_done
256 cmp b32 $r4 0
257 bra ne #i2c_put_byte_next
258 i2c_trace_call(i2c_bitr)
259 bra not $p1 #i2c_put_byte_done
260 i2c_trace_next()
261 cmp b32 $r3 1
262 bra ne #i2c_put_byte_done
263 bclr $flags $p1 // nack
264 i2c_put_byte_done:
265 ret
266
267i2c_addr:
268 i2c_trace_call(i2c_start)
269 bra not $p1 #i2c_addr_done
270 extr $r3 $r12 I2C__MSG_DATA0_ADDR
271 shl b32 $r3 1
272 or $r5 $r3
273 i2c_trace_call(i2c_put_byte)
274 i2c_addr_done:
275 ret
276
277i2c_acquire_addr:
278 extr $r14 $r12 I2C__MSG_DATA0_PORT
279#if NVKM_PPWR_CHIPSET < GF119
280 shl b32 $r14 2
281 add b32 $r14 #i2c_ctrl
282 ld b32 $r14 D[$r14]
283#else
284 shl b32 $r14 5
285 add b32 $r14 0x00d014
286#endif
287 ret
288
289i2c_acquire:
290 call(i2c_acquire_addr)
291 call(rd32)
292 bset $r13 3
293 call(wr32)
294 ret
295
296i2c_release:
297 call(i2c_acquire_addr)
298 call(rd32)
299 bclr $r13 3
300 call(wr32)
301 ret
302
303// description
304//
305// $r15 - current (i2c)
306// $r14 - sender process name
307// $r13 - message
308// $r12 - data0
309// $r11 - data1
310// $r0 - zero
311i2c_recv:
312 bclr $flags $p1
313 extr $r1 $r12 I2C__MSG_DATA0_PORT
314 shl b32 $r1 2
315 cmp b32 $r1 (#i2c_sda_map - #i2c_scl_map)
316 bra ge #i2c_recv_done
317 add b32 $r3 $r1 #i2c_sda_map
318 ld b32 $r2 D[$r3]
319 add b32 $r3 $r1 #i2c_scl_map
320 ld b32 $r1 D[$r3]
321
322 bset $flags $p2
323 push $r13
324 push $r14
325
326 push $r13
327 i2c_trace_init()
328 i2c_trace_call(i2c_acquire)
329 pop $r13
330
331 cmp b32 $r13 I2C__MSG_RD08
332 bra ne #i2c_recv_not_rd08
333 mov $r5 0
334 i2c_trace_call(i2c_addr)
335 bra not $p1 #i2c_recv_done
336 extr $r5 $r12 I2C__MSG_DATA0_RD08_REG
337 i2c_trace_call(i2c_put_byte)
338 bra not $p1 #i2c_recv_done
339 mov $r5 1
340 i2c_trace_call(i2c_addr)
341 bra not $p1 #i2c_recv_done
342 i2c_trace_call(i2c_get_byte)
343 bra not $p1 #i2c_recv_done
344 ins $r11 $r5 I2C__MSG_DATA1_RD08_VAL
345 i2c_trace_call(i2c_stop)
346 mov b32 $r11 $r5
347 clear b32 $r7
348 bra #i2c_recv_done
349
350 i2c_recv_not_rd08:
351 cmp b32 $r13 I2C__MSG_WR08
352 bra ne #i2c_recv_not_wr08
353 mov $r5 0
354 call(i2c_addr)
355 bra not $p1 #i2c_recv_done
356 extr $r5 $r12 I2C__MSG_DATA0_WR08_REG
357 call(i2c_put_byte)
358 bra not $p1 #i2c_recv_done
359 mov $r5 0
360 call(i2c_addr)
361 bra not $p1 #i2c_recv_done
362 extr $r5 $r11 I2C__MSG_DATA1_WR08_VAL
363 call(i2c_put_byte)
364 bra not $p1 #i2c_recv_done
365 call(i2c_stop)
366 clear b32 $r7
367 extr $r5 $r12 I2C__MSG_DATA0_WR08_SYNC
368 bra nz #i2c_recv_done
369 bclr $flags $p2
370 bra #i2c_recv_done
371
372 i2c_recv_not_wr08:
373
374 i2c_recv_done:
375 extr $r14 $r12 I2C__MSG_DATA0_PORT
376 call(i2c_release)
377
378 pop $r14
379 pop $r13
380 bra not $p2 #i2c_recv_exit
381 mov b32 $r12 $r7
382 call(send)
383
384 i2c_recv_exit:
385 ret
386
387// description
388//
389// $r15 - current (i2c)
390// $r0 - zero
391i2c_init:
392 ret
393#endif
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/macros.fuc b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/macros.fuc
index 2a74ea907604..e2a63ac5422b 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/macros.fuc
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/macros.fuc
@@ -83,6 +83,50 @@
83#define NV_PPWR_MMIO_CTRL_OP_WR 0x00000002 83#define NV_PPWR_MMIO_CTRL_OP_WR 0x00000002
84#define NV_PPWR_OUTPUT 0x07c0 84#define NV_PPWR_OUTPUT 0x07c0
85#define NV_PPWR_OUTPUT_FB_PAUSE 0x00000004 85#define NV_PPWR_OUTPUT_FB_PAUSE 0x00000004
86#if NVKM_PPWR_CHIPSET < GF119
87#define NV_PPWR_OUTPUT_I2C_3_SCL 0x00000100
88#define NV_PPWR_OUTPUT_I2C_3_SDA 0x00000200
89#define NV_PPWR_OUTPUT_I2C_0_SCL 0x00001000
90#define NV_PPWR_OUTPUT_I2C_0_SDA 0x00002000
91#define NV_PPWR_OUTPUT_I2C_1_SCL 0x00004000
92#define NV_PPWR_OUTPUT_I2C_1_SDA 0x00008000
93#define NV_PPWR_OUTPUT_I2C_2_SCL 0x00010000
94#define NV_PPWR_OUTPUT_I2C_2_SDA 0x00020000
95#define NV_PPWR_OUTPUT_I2C_4_SCL 0x00040000
96#define NV_PPWR_OUTPUT_I2C_4_SDA 0x00080000
97#define NV_PPWR_OUTPUT_I2C_5_SCL 0x00100000
98#define NV_PPWR_OUTPUT_I2C_5_SDA 0x00200000
99#define NV_PPWR_OUTPUT_I2C_6_SCL 0x00400000
100#define NV_PPWR_OUTPUT_I2C_6_SDA 0x00800000
101#define NV_PPWR_OUTPUT_I2C_7_SCL 0x01000000
102#define NV_PPWR_OUTPUT_I2C_7_SDA 0x02000000
103#define NV_PPWR_OUTPUT_I2C_8_SCL 0x04000000
104#define NV_PPWR_OUTPUT_I2C_8_SDA 0x08000000
105#define NV_PPWR_OUTPUT_I2C_9_SCL 0x10000000
106#define NV_PPWR_OUTPUT_I2C_9_SDA 0x20000000
107#else
108#define NV_PPWR_OUTPUT_I2C_0_SCL 0x00000400
109#define NV_PPWR_OUTPUT_I2C_1_SCL 0x00000800
110#define NV_PPWR_OUTPUT_I2C_2_SCL 0x00001000
111#define NV_PPWR_OUTPUT_I2C_3_SCL 0x00002000
112#define NV_PPWR_OUTPUT_I2C_4_SCL 0x00004000
113#define NV_PPWR_OUTPUT_I2C_5_SCL 0x00008000
114#define NV_PPWR_OUTPUT_I2C_6_SCL 0x00010000
115#define NV_PPWR_OUTPUT_I2C_7_SCL 0x00020000
116#define NV_PPWR_OUTPUT_I2C_8_SCL 0x00040000
117#define NV_PPWR_OUTPUT_I2C_9_SCL 0x00080000
118#define NV_PPWR_OUTPUT_I2C_0_SDA 0x00100000
119#define NV_PPWR_OUTPUT_I2C_1_SDA 0x00200000
120#define NV_PPWR_OUTPUT_I2C_2_SDA 0x00400000
121#define NV_PPWR_OUTPUT_I2C_3_SDA 0x00800000
122#define NV_PPWR_OUTPUT_I2C_4_SDA 0x01000000
123#define NV_PPWR_OUTPUT_I2C_5_SDA 0x02000000
124#define NV_PPWR_OUTPUT_I2C_6_SDA 0x04000000
125#define NV_PPWR_OUTPUT_I2C_7_SDA 0x08000000
126#define NV_PPWR_OUTPUT_I2C_8_SDA 0x10000000
127#define NV_PPWR_OUTPUT_I2C_9_SDA 0x20000000
128#endif
129#define NV_PPWR_INPUT 0x07c4
86#define NV_PPWR_OUTPUT_SET 0x07e0 130#define NV_PPWR_OUTPUT_SET 0x07e0
87#define NV_PPWR_OUTPUT_SET_FB_PAUSE 0x00000004 131#define NV_PPWR_OUTPUT_SET_FB_PAUSE 0x00000004
88#define NV_PPWR_OUTPUT_CLR 0x07e4 132#define NV_PPWR_OUTPUT_CLR 0x07e4
@@ -125,6 +169,15 @@
125*/ .b32 0 /* 169*/ .b32 0 /*
126*/ .skip 64 170*/ .skip 64
127 171
172#if NV_PPWR_CHIPSET < GK208
173#define imm32(reg,val) /*
174*/ movw reg ((val) & 0x0000ffff) /*
175*/ sethi reg ((val) & 0xffff0000)
176#else
177#define imm32(reg,val) /*
178*/ mov reg (val)
179#endif
180
128#ifndef NVKM_FALCON_UNSHIFTED_IO 181#ifndef NVKM_FALCON_UNSHIFTED_IO
129#define nv_iord(reg,ior) /* 182#define nv_iord(reg,ior) /*
130*/ mov reg ior /* 183*/ mov reg ior /*
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc
index 947be536daef..17a8a383d91a 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc
@@ -37,6 +37,7 @@
37#include "host.fuc" 37#include "host.fuc"
38#include "memx.fuc" 38#include "memx.fuc"
39#include "perf.fuc" 39#include "perf.fuc"
40#include "i2c_.fuc"
40#include "test.fuc" 41#include "test.fuc"
41#include "idle.fuc" 42#include "idle.fuc"
42#undef INCLUDE_PROC 43#undef INCLUDE_PROC
@@ -46,6 +47,7 @@
46#include "host.fuc" 47#include "host.fuc"
47#include "memx.fuc" 48#include "memx.fuc"
48#include "perf.fuc" 49#include "perf.fuc"
50#include "i2c_.fuc"
49#include "test.fuc" 51#include "test.fuc"
50#include "idle.fuc" 52#include "idle.fuc"
51#undef INCLUDE_DATA 53#undef INCLUDE_DATA
@@ -57,6 +59,7 @@
57#include "host.fuc" 59#include "host.fuc"
58#include "memx.fuc" 60#include "memx.fuc"
59#include "perf.fuc" 61#include "perf.fuc"
62#include "i2c_.fuc"
60#include "test.fuc" 63#include "test.fuc"
61#include "idle.fuc" 64#include "idle.fuc"
62#undef INCLUDE_CODE 65#undef INCLUDE_CODE
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc.h b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc.h
index 255234ae4201..4bd43a99fdcc 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc.h
@@ -89,16 +89,9 @@ uint32_t nv108_pwr_data[] = {
89 0x00000000, 89 0x00000000,
90 0x00000000, 90 0x00000000,
91 0x00000000, 91 0x00000000,
92 0x54534554, 92 0x5f433249,
93 0x00000494, 93 0x00000877,
94 0x00000475, 94 0x0000071e,
95 0x00000000,
96 0x00000000,
97 0x00000000,
98 0x00000000,
99 0x00000000,
100 0x00000000,
101 0x00000000,
102 0x00000000, 95 0x00000000,
103 0x00000000, 96 0x00000000,
104 0x00000000, 97 0x00000000,
@@ -111,15 +104,6 @@ uint32_t nv108_pwr_data[] = {
111 0x00000000, 104 0x00000000,
112 0x00000000, 105 0x00000000,
113 0x00000000, 106 0x00000000,
114 0x454c4449,
115 0x0000049f,
116 0x0000049d,
117 0x00000000,
118 0x00000000,
119 0x00000000,
120 0x00000000,
121 0x00000000,
122 0x00000000,
123 0x00000000, 107 0x00000000,
124 0x00000000, 108 0x00000000,
125 0x00000000, 109 0x00000000,
@@ -127,18 +111,17 @@ uint32_t nv108_pwr_data[] = {
127 0x00000000, 111 0x00000000,
128 0x00000000, 112 0x00000000,
129 0x00000000, 113 0x00000000,
114 0x54534554,
115 0x00000898,
116 0x00000879,
130 0x00000000, 117 0x00000000,
131 0x00000000, 118 0x00000000,
132 0x00000000, 119 0x00000000,
133 0x00000000, 120 0x00000000,
134 0x00000000, 121 0x00000000,
135 0x00000000, 122 0x00000000,
136/* 0x0210: proc_list_tail */
137/* 0x0210: time_prev */
138 0x00000000, 123 0x00000000,
139/* 0x0214: time_next */
140 0x00000000, 124 0x00000000,
141/* 0x0218: fifo_queue */
142 0x00000000, 125 0x00000000,
143 0x00000000, 126 0x00000000,
144 0x00000000, 127 0x00000000,
@@ -150,6 +133,9 @@ uint32_t nv108_pwr_data[] = {
150 0x00000000, 133 0x00000000,
151 0x00000000, 134 0x00000000,
152 0x00000000, 135 0x00000000,
136 0x454c4449,
137 0x000008a3,
138 0x000008a1,
153 0x00000000, 139 0x00000000,
154 0x00000000, 140 0x00000000,
155 0x00000000, 141 0x00000000,
@@ -169,9 +155,12 @@ uint32_t nv108_pwr_data[] = {
169 0x00000000, 155 0x00000000,
170 0x00000000, 156 0x00000000,
171 0x00000000, 157 0x00000000,
158/* 0x0268: proc_list_tail */
159/* 0x0268: time_prev */
172 0x00000000, 160 0x00000000,
161/* 0x026c: time_next */
173 0x00000000, 162 0x00000000,
174/* 0x0298: rfifo_queue */ 163/* 0x0270: fifo_queue */
175 0x00000000, 164 0x00000000,
176 0x00000000, 165 0x00000000,
177 0x00000000, 166 0x00000000,
@@ -204,31 +193,7 @@ uint32_t nv108_pwr_data[] = {
204 0x00000000, 193 0x00000000,
205 0x00000000, 194 0x00000000,
206 0x00000000, 195 0x00000000,
207/* 0x0318: memx_func_head */ 196/* 0x02f0: rfifo_queue */
208 0x00010000,
209 0x00000000,
210 0x000003a9,
211/* 0x0324: memx_func_next */
212 0x00000001,
213 0x00000000,
214 0x000003c7,
215 0x00000002,
216 0x00000002,
217 0x000003df,
218 0x00040003,
219 0x00000000,
220 0x00000407,
221 0x00010004,
222 0x00000000,
223 0x00000421,
224/* 0x0354: memx_func_tail */
225/* 0x0354: memx_data_head */
226 0x00000000,
227 0x00000000,
228 0x00000000,
229 0x00000000,
230 0x00000000,
231 0x00000000,
232 0x00000000, 197 0x00000000,
233 0x00000000, 198 0x00000000,
234 0x00000000, 199 0x00000000,
@@ -261,10 +226,25 @@ uint32_t nv108_pwr_data[] = {
261 0x00000000, 226 0x00000000,
262 0x00000000, 227 0x00000000,
263 0x00000000, 228 0x00000000,
229/* 0x0370: memx_func_head */
230 0x00010000,
264 0x00000000, 231 0x00000000,
232 0x000003a9,
233/* 0x037c: memx_func_next */
234 0x00000001,
265 0x00000000, 235 0x00000000,
236 0x000003c7,
237 0x00000002,
238 0x00000002,
239 0x000003df,
240 0x00040003,
266 0x00000000, 241 0x00000000,
242 0x00000407,
243 0x00010004,
267 0x00000000, 244 0x00000000,
245 0x00000421,
246/* 0x03ac: memx_func_tail */
247/* 0x03ac: memx_data_head */
268 0x00000000, 248 0x00000000,
269 0x00000000, 249 0x00000000,
270 0x00000000, 250 0x00000000,
@@ -735,7 +715,6 @@ uint32_t nv108_pwr_data[] = {
735 0x00000000, 715 0x00000000,
736 0x00000000, 716 0x00000000,
737 0x00000000, 717 0x00000000,
738/* 0x0b54: memx_data_tail */
739 0x00000000, 718 0x00000000,
740 0x00000000, 719 0x00000000,
741 0x00000000, 720 0x00000000,
@@ -778,6 +757,29 @@ uint32_t nv108_pwr_data[] = {
778 0x00000000, 757 0x00000000,
779 0x00000000, 758 0x00000000,
780 0x00000000, 759 0x00000000,
760/* 0x0bac: memx_data_tail */
761/* 0x0bac: i2c_scl_map */
762 0x00000400,
763 0x00000800,
764 0x00001000,
765 0x00002000,
766 0x00004000,
767 0x00008000,
768 0x00010000,
769 0x00020000,
770 0x00040000,
771 0x00080000,
772/* 0x0bd4: i2c_sda_map */
773 0x00100000,
774 0x00200000,
775 0x00400000,
776 0x00800000,
777 0x01000000,
778 0x02000000,
779 0x04000000,
780 0x08000000,
781 0x10000000,
782 0x20000000,
781 0x00000000, 783 0x00000000,
782}; 784};
783 785
@@ -832,20 +834,20 @@ uint32_t nv108_pwr_code[] = {
832 0x03e99800, 834 0x03e99800,
833 0xf40096b0, 835 0xf40096b0,
834 0x0a98280b, 836 0x0a98280b,
835 0x029abb84, 837 0x029abb9a,
836 0x0d0e1cf4, 838 0x0d0e1cf4,
837 0x01de7e01, 839 0x01de7e01,
838 0xf494bd00, 840 0xf494bd00,
839/* 0x00b2: intr_watchdog_next_time */ 841/* 0x00b2: intr_watchdog_next_time */
840 0x0a98140e, 842 0x0a98140e,
841 0x00a6b085, 843 0x00a6b09b,
842 0xa6080bf4, 844 0xa6080bf4,
843 0x061cf49a, 845 0x061cf49a,
844/* 0x00c0: intr_watchdog_next_time_set */ 846/* 0x00c0: intr_watchdog_next_time_set */
845/* 0x00c3: intr_watchdog_next_proc */ 847/* 0x00c3: intr_watchdog_next_proc */
846 0xb58509b5, 848 0xb59b09b5,
847 0xe0b603e9, 849 0xe0b603e9,
848 0x10e6b158, 850 0x68e6b158,
849 0xc81bf402, 851 0xc81bf402,
850/* 0x00d2: intr */ 852/* 0x00d2: intr */
851 0x00f900f8, 853 0x00f900f8,
@@ -862,15 +864,15 @@ uint32_t nv108_pwr_code[] = {
862 0x080804bd, 864 0x080804bd,
863 0xc40088cf, 865 0xc40088cf,
864 0x0bf40289, 866 0x0bf40289,
865 0x8500b51f, 867 0x9b00b51f,
866 0x957e580e, 868 0x957e580e,
867 0x09980000, 869 0x09980000,
868 0x0096b085, 870 0x0096b09b,
869 0x000d0bf4, 871 0x000d0bf4,
870 0x0009f634, 872 0x0009f634,
871 0x09b504bd, 873 0x09b504bd,
872/* 0x0125: intr_skip_watchdog */ 874/* 0x0125: intr_skip_watchdog */
873 0x0089e484, 875 0x0089e49a,
874 0x360bf408, 876 0x360bf408,
875 0xcf068849, 877 0xcf068849,
876 0x9ac40099, 878 0x9ac40099,
@@ -918,7 +920,7 @@ uint32_t nv108_pwr_code[] = {
918/* 0x01c6: timer_reset */ 920/* 0x01c6: timer_reset */
919 0x3400161e, 921 0x3400161e,
920 0xbd000ef6, 922 0xbd000ef6,
921 0x840eb504, 923 0x9a0eb504,
922/* 0x01d0: timer_enable */ 924/* 0x01d0: timer_enable */
923 0x38000108, 925 0x38000108,
924 0xbd0008f6, 926 0xbd0008f6,
@@ -949,7 +951,7 @@ uint32_t nv108_pwr_code[] = {
949 0xa6008a98, 951 0xa6008a98,
950 0x100bf4ae, 952 0x100bf4ae,
951 0xb15880b6, 953 0xb15880b6,
952 0xf4021086, 954 0xf4026886,
953 0x32f4f11b, 955 0x32f4f11b,
954/* 0x0239: find_done */ 956/* 0x0239: find_done */
955 0xfc8eb201, 957 0xfc8eb201,
@@ -1009,7 +1011,7 @@ uint32_t nv108_pwr_code[] = {
1009 0x0bf412a6, 1011 0x0bf412a6,
1010 0x071ec42e, 1012 0x071ec42e,
1011 0xb704ee94, 1013 0xb704ee94,
1012 0x980218e0, 1014 0x980270e0,
1013 0xec9803eb, 1015 0xec9803eb,
1014 0x01ed9802, 1016 0x01ed9802,
1015 0x7e00ee98, 1017 0x7e00ee98,
@@ -1031,7 +1033,7 @@ uint32_t nv108_pwr_code[] = {
1031 0xf412a608, 1033 0xf412a608,
1032 0x23c4ef0b, 1034 0x23c4ef0b,
1033 0x0434b607, 1035 0x0434b607,
1034 0x029830b7, 1036 0x02f030b7,
1035 0xb5033bb5, 1037 0xb5033bb5,
1036 0x3db5023c, 1038 0x3db5023c,
1037 0x003eb501, 1039 0x003eb501,
@@ -1044,11 +1046,11 @@ uint32_t nv108_pwr_code[] = {
1044/* 0x0379: host_init */ 1046/* 0x0379: host_init */
1045 0x00804100, 1047 0x00804100,
1046 0xf11014b6, 1048 0xf11014b6,
1047 0x40021815, 1049 0x40027015,
1048 0x01f604d0, 1050 0x01f604d0,
1049 0x4104bd00, 1051 0x4104bd00,
1050 0x14b60080, 1052 0x14b60080,
1051 0x9815f110, 1053 0xf015f110,
1052 0x04dc4002, 1054 0x04dc4002,
1053 0xbd0001f6, 1055 0xbd0001f6,
1054 0x40010104, 1056 0x40010104,
@@ -1101,13 +1103,13 @@ uint32_t nv108_pwr_code[] = {
1101 0x001398b2, 1103 0x001398b2,
1102 0x950410b6, 1104 0x950410b6,
1103 0x30f01034, 1105 0x30f01034,
1104 0xc835980c, 1106 0xde35980c,
1105 0x12a655f9, 1107 0x12a655f9,
1106 0xfced1ef4, 1108 0xfced1ef4,
1107 0x7ee0fcd0, 1109 0x7ee0fcd0,
1108 0xf800023f, 1110 0xf800023f,
1109/* 0x0455: memx_info */ 1111/* 0x0455: memx_info */
1110 0x03544c00, 1112 0x03ac4c00,
1111 0x7e08004b, 1113 0x7e08004b,
1112 0xf800023f, 1114 0xf800023f,
1113/* 0x0461: memx_recv */ 1115/* 0x0461: memx_recv */
@@ -1119,7 +1121,301 @@ uint32_t nv108_pwr_code[] = {
1119/* 0x0471: perf_recv */ 1121/* 0x0471: perf_recv */
1120/* 0x0473: perf_init */ 1122/* 0x0473: perf_init */
1121 0xf800f800, 1123 0xf800f800,
1122/* 0x0475: test_recv */ 1124/* 0x0475: i2c_drive_scl */
1125 0x0036b000,
1126 0x400d0bf4,
1127 0x01f607e0,
1128 0xf804bd00,
1129/* 0x0485: i2c_drive_scl_lo */
1130 0x07e44000,
1131 0xbd0001f6,
1132/* 0x048f: i2c_drive_sda */
1133 0xb000f804,
1134 0x0bf40036,
1135 0x07e0400d,
1136 0xbd0002f6,
1137/* 0x049f: i2c_drive_sda_lo */
1138 0x4000f804,
1139 0x02f607e4,
1140 0xf804bd00,
1141/* 0x04a9: i2c_sense_scl */
1142 0x0132f400,
1143 0xcf07c443,
1144 0x31fd0033,
1145 0x060bf404,
1146/* 0x04bb: i2c_sense_scl_done */
1147 0xf80131f4,
1148/* 0x04bd: i2c_sense_sda */
1149 0x0132f400,
1150 0xcf07c443,
1151 0x32fd0033,
1152 0x060bf404,
1153/* 0x04cf: i2c_sense_sda_done */
1154 0xf80131f4,
1155/* 0x04d1: i2c_raise_scl */
1156 0x4440f900,
1157 0x01030898,
1158 0x0004757e,
1159/* 0x04dc: i2c_raise_scl_wait */
1160 0x7e03e84e,
1161 0x7e00005d,
1162 0xf40004a9,
1163 0x42b60901,
1164 0xef1bf401,
1165/* 0x04f0: i2c_raise_scl_done */
1166 0x00f840fc,
1167/* 0x04f4: i2c_start */
1168 0x0004a97e,
1169 0x7e0d11f4,
1170 0xf40004bd,
1171 0x0ef40611,
1172/* 0x0505: i2c_start_rep */
1173 0x7e00032e,
1174 0x03000475,
1175 0x048f7e01,
1176 0x0076bb00,
1177 0xf90465b6,
1178 0x04659450,
1179 0xbd0256bb,
1180 0x0475fd50,
1181 0xd17e50fc,
1182 0x64b60004,
1183 0x1d11f404,
1184/* 0x0530: i2c_start_send */
1185 0x8f7e0003,
1186 0x884e0004,
1187 0x005d7e13,
1188 0x7e000300,
1189 0x4e000475,
1190 0x5d7e1388,
1191/* 0x054a: i2c_start_out */
1192 0x00f80000,
1193/* 0x054c: i2c_stop */
1194 0x757e0003,
1195 0x00030004,
1196 0x00048f7e,
1197 0x7e03e84e,
1198 0x0300005d,
1199 0x04757e01,
1200 0x13884e00,
1201 0x00005d7e,
1202 0x8f7e0103,
1203 0x884e0004,
1204 0x005d7e13,
1205/* 0x057b: i2c_bitw */
1206 0x7e00f800,
1207 0x4e00048f,
1208 0x5d7e03e8,
1209 0x76bb0000,
1210 0x0465b600,
1211 0x659450f9,
1212 0x0256bb04,
1213 0x75fd50bd,
1214 0x7e50fc04,
1215 0xb60004d1,
1216 0x11f40464,
1217 0x13884e17,
1218 0x00005d7e,
1219 0x757e0003,
1220 0x884e0004,
1221 0x005d7e13,
1222/* 0x05b9: i2c_bitw_out */
1223/* 0x05bb: i2c_bitr */
1224 0x0300f800,
1225 0x048f7e01,
1226 0x03e84e00,
1227 0x00005d7e,
1228 0xb60076bb,
1229 0x50f90465,
1230 0xbb046594,
1231 0x50bd0256,
1232 0xfc0475fd,
1233 0x04d17e50,
1234 0x0464b600,
1235 0x7e1a11f4,
1236 0x030004bd,
1237 0x04757e00,
1238 0x13884e00,
1239 0x00005d7e,
1240 0xf4013cf0,
1241/* 0x05fe: i2c_bitr_done */
1242 0x00f80131,
1243/* 0x0600: i2c_get_byte */
1244 0x08040005,
1245/* 0x0604: i2c_get_byte_next */
1246 0xbb0154b6,
1247 0x65b60076,
1248 0x9450f904,
1249 0x56bb0465,
1250 0xfd50bd02,
1251 0x50fc0475,
1252 0x0005bb7e,
1253 0xf40464b6,
1254 0x53fd2a11,
1255 0x0142b605,
1256 0x03d81bf4,
1257 0x0076bb01,
1258 0xf90465b6,
1259 0x04659450,
1260 0xbd0256bb,
1261 0x0475fd50,
1262 0x7b7e50fc,
1263 0x64b60005,
1264/* 0x064d: i2c_get_byte_done */
1265/* 0x064f: i2c_put_byte */
1266 0x0400f804,
1267/* 0x0651: i2c_put_byte_next */
1268 0x0142b608,
1269 0xbb3854ff,
1270 0x65b60076,
1271 0x9450f904,
1272 0x56bb0465,
1273 0xfd50bd02,
1274 0x50fc0475,
1275 0x00057b7e,
1276 0xf40464b6,
1277 0x46b03411,
1278 0xd81bf400,
1279 0xb60076bb,
1280 0x50f90465,
1281 0xbb046594,
1282 0x50bd0256,
1283 0xfc0475fd,
1284 0x05bb7e50,
1285 0x0464b600,
1286 0xbb0f11f4,
1287 0x36b00076,
1288 0x061bf401,
1289/* 0x06a7: i2c_put_byte_done */
1290 0xf80132f4,
1291/* 0x06a9: i2c_addr */
1292 0x0076bb00,
1293 0xf90465b6,
1294 0x04659450,
1295 0xbd0256bb,
1296 0x0475fd50,
1297 0xf47e50fc,
1298 0x64b60004,
1299 0x2911f404,
1300 0x012ec3e7,
1301 0xfd0134b6,
1302 0x76bb0553,
1303 0x0465b600,
1304 0x659450f9,
1305 0x0256bb04,
1306 0x75fd50bd,
1307 0x7e50fc04,
1308 0xb600064f,
1309/* 0x06ee: i2c_addr_done */
1310 0x00f80464,
1311/* 0x06f0: i2c_acquire_addr */
1312 0xb6f8cec7,
1313 0xe0b705e4,
1314 0x00f8d014,
1315/* 0x06fc: i2c_acquire */
1316 0x0006f07e,
1317 0x0000047e,
1318 0x7e03d9f0,
1319 0xf800002e,
1320/* 0x070d: i2c_release */
1321 0x06f07e00,
1322 0x00047e00,
1323 0x03daf000,
1324 0x00002e7e,
1325/* 0x071e: i2c_recv */
1326 0x32f400f8,
1327 0xf8c1c701,
1328 0xb00214b6,
1329 0x1ff52816,
1330 0x13b80137,
1331 0x98000bd4,
1332 0x13b80032,
1333 0x98000bac,
1334 0x31f40031,
1335 0xf9d0f902,
1336 0xf1d0f9e0,
1337 0xf1000067,
1338 0x92100063,
1339 0x76bb0167,
1340 0x0465b600,
1341 0x659450f9,
1342 0x0256bb04,
1343 0x75fd50bd,
1344 0x7e50fc04,
1345 0xb60006fc,
1346 0xd0fc0464,
1347 0xf500d6b0,
1348 0x0500b01b,
1349 0x0076bb00,
1350 0xf90465b6,
1351 0x04659450,
1352 0xbd0256bb,
1353 0x0475fd50,
1354 0xa97e50fc,
1355 0x64b60006,
1356 0xcc11f504,
1357 0xe0c5c700,
1358 0xb60076bb,
1359 0x50f90465,
1360 0xbb046594,
1361 0x50bd0256,
1362 0xfc0475fd,
1363 0x064f7e50,
1364 0x0464b600,
1365 0x00a911f5,
1366 0x76bb0105,
1367 0x0465b600,
1368 0x659450f9,
1369 0x0256bb04,
1370 0x75fd50bd,
1371 0x7e50fc04,
1372 0xb60006a9,
1373 0x11f50464,
1374 0x76bb0087,
1375 0x0465b600,
1376 0x659450f9,
1377 0x0256bb04,
1378 0x75fd50bd,
1379 0x7e50fc04,
1380 0xb6000600,
1381 0x11f40464,
1382 0xe05bcb67,
1383 0xb60076bb,
1384 0x50f90465,
1385 0xbb046594,
1386 0x50bd0256,
1387 0xfc0475fd,
1388 0x054c7e50,
1389 0x0464b600,
1390 0x74bd5bb2,
1391/* 0x0823: i2c_recv_not_rd08 */
1392 0xb0410ef4,
1393 0x1bf401d6,
1394 0x7e00053b,
1395 0xf40006a9,
1396 0xc5c73211,
1397 0x064f7ee0,
1398 0x2811f400,
1399 0xa97e0005,
1400 0x11f40006,
1401 0xe0b5c71f,
1402 0x00064f7e,
1403 0x7e1511f4,
1404 0xbd00054c,
1405 0x08c5c774,
1406 0xf4091bf4,
1407 0x0ef40232,
1408/* 0x0861: i2c_recv_not_wr08 */
1409/* 0x0861: i2c_recv_done */
1410 0xf8cec703,
1411 0x00070d7e,
1412 0xd0fce0fc,
1413 0xb20912f4,
1414 0x023f7e7c,
1415/* 0x0875: i2c_recv_exit */
1416/* 0x0877: i2c_init */
1417 0xf800f800,
1418/* 0x0879: test_recv */
1123 0x04584100, 1419 0x04584100,
1124 0xb60011cf, 1420 0xb60011cf,
1125 0x58400110, 1421 0x58400110,
@@ -1128,26 +1424,26 @@ uint32_t nv108_pwr_code[] = {
1128 0xe3f1d900, 1424 0xe3f1d900,
1129 0x967e134f, 1425 0x967e134f,
1130 0x00f80001, 1426 0x00f80001,
1131/* 0x0494: test_init */ 1427/* 0x0898: test_init */
1132 0x7e08004e, 1428 0x7e08004e,
1133 0xf8000196, 1429 0xf8000196,
1134/* 0x049d: idle_recv */ 1430/* 0x08a1: idle_recv */
1135/* 0x049f: idle */ 1431/* 0x08a3: idle */
1136 0xf400f800, 1432 0xf400f800,
1137 0x54410031, 1433 0x54410031,
1138 0x0011cf04, 1434 0x0011cf04,
1139 0x400110b6, 1435 0x400110b6,
1140 0x01f60454, 1436 0x01f60454,
1141/* 0x04b3: idle_loop */ 1437/* 0x08b7: idle_loop */
1142 0x0104bd00, 1438 0x0104bd00,
1143 0x0232f458, 1439 0x0232f458,
1144/* 0x04b8: idle_proc */ 1440/* 0x08bc: idle_proc */
1145/* 0x04b8: idle_proc_exec */ 1441/* 0x08bc: idle_proc_exec */
1146 0x1eb210f9, 1442 0x1eb210f9,
1147 0x0002487e, 1443 0x0002487e,
1148 0x11f410fc, 1444 0x11f410fc,
1149 0x0231f409, 1445 0x0231f409,
1150/* 0x04cb: idle_proc_next */ 1446/* 0x08cf: idle_proc_next */
1151 0xb6f00ef4, 1447 0xb6f00ef4,
1152 0x1fa65810, 1448 0x1fa65810,
1153 0xf4e81bf4, 1449 0xf4e81bf4,
@@ -1161,5 +1457,4 @@ uint32_t nv108_pwr_code[] = {
1161 0x00000000, 1457 0x00000000,
1162 0x00000000, 1458 0x00000000,
1163 0x00000000, 1459 0x00000000,
1164 0x00000000,
1165}; 1460};
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc
index 6fde0b89e5aa..6744fcc06151 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc
@@ -37,6 +37,7 @@
37#include "host.fuc" 37#include "host.fuc"
38#include "memx.fuc" 38#include "memx.fuc"
39#include "perf.fuc" 39#include "perf.fuc"
40#include "i2c_.fuc"
40#include "test.fuc" 41#include "test.fuc"
41#include "idle.fuc" 42#include "idle.fuc"
42#undef INCLUDE_PROC 43#undef INCLUDE_PROC
@@ -46,6 +47,7 @@
46#include "host.fuc" 47#include "host.fuc"
47#include "memx.fuc" 48#include "memx.fuc"
48#include "perf.fuc" 49#include "perf.fuc"
50#include "i2c_.fuc"
49#include "test.fuc" 51#include "test.fuc"
50#include "idle.fuc" 52#include "idle.fuc"
51#undef INCLUDE_DATA 53#undef INCLUDE_DATA
@@ -57,6 +59,7 @@
57#include "host.fuc" 59#include "host.fuc"
58#include "memx.fuc" 60#include "memx.fuc"
59#include "perf.fuc" 61#include "perf.fuc"
62#include "i2c_.fuc"
60#include "test.fuc" 63#include "test.fuc"
61#include "idle.fuc" 64#include "idle.fuc"
62#undef INCLUDE_CODE 65#undef INCLUDE_CODE
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc.h b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc.h
index 66a3109defdd..5a73fa620978 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc.h
@@ -89,9 +89,31 @@ uint32_t nva3_pwr_data[] = {
89 0x00000000, 89 0x00000000,
90 0x00000000, 90 0x00000000,
91 0x00000000, 91 0x00000000,
92 0x5f433249,
93 0x00000982,
94 0x00000825,
95 0x00000000,
96 0x00000000,
97 0x00000000,
98 0x00000000,
99 0x00000000,
100 0x00000000,
101 0x00000000,
102 0x00000000,
103 0x00000000,
104 0x00000000,
105 0x00000000,
106 0x00000000,
107 0x00000000,
108 0x00000000,
109 0x00000000,
110 0x00000000,
111 0x00000000,
112 0x00000000,
113 0x00000000,
92 0x54534554, 114 0x54534554,
93 0x0000057b, 115 0x000009ab,
94 0x00000554, 116 0x00000984,
95 0x00000000, 117 0x00000000,
96 0x00000000, 118 0x00000000,
97 0x00000000, 119 0x00000000,
@@ -112,8 +134,8 @@ uint32_t nva3_pwr_data[] = {
112 0x00000000, 134 0x00000000,
113 0x00000000, 135 0x00000000,
114 0x454c4449, 136 0x454c4449,
115 0x00000587, 137 0x000009b7,
116 0x00000585, 138 0x000009b5,
117 0x00000000, 139 0x00000000,
118 0x00000000, 140 0x00000000,
119 0x00000000, 141 0x00000000,
@@ -133,12 +155,12 @@ uint32_t nva3_pwr_data[] = {
133 0x00000000, 155 0x00000000,
134 0x00000000, 156 0x00000000,
135 0x00000000, 157 0x00000000,
136/* 0x0210: proc_list_tail */ 158/* 0x0268: proc_list_tail */
137/* 0x0210: time_prev */ 159/* 0x0268: time_prev */
138 0x00000000, 160 0x00000000,
139/* 0x0214: time_next */ 161/* 0x026c: time_next */
140 0x00000000, 162 0x00000000,
141/* 0x0218: fifo_queue */ 163/* 0x0270: fifo_queue */
142 0x00000000, 164 0x00000000,
143 0x00000000, 165 0x00000000,
144 0x00000000, 166 0x00000000,
@@ -171,7 +193,7 @@ uint32_t nva3_pwr_data[] = {
171 0x00000000, 193 0x00000000,
172 0x00000000, 194 0x00000000,
173 0x00000000, 195 0x00000000,
174/* 0x0298: rfifo_queue */ 196/* 0x02f0: rfifo_queue */
175 0x00000000, 197 0x00000000,
176 0x00000000, 198 0x00000000,
177 0x00000000, 199 0x00000000,
@@ -204,11 +226,11 @@ uint32_t nva3_pwr_data[] = {
204 0x00000000, 226 0x00000000,
205 0x00000000, 227 0x00000000,
206 0x00000000, 228 0x00000000,
207/* 0x0318: memx_func_head */ 229/* 0x0370: memx_func_head */
208 0x00010000, 230 0x00010000,
209 0x00000000, 231 0x00000000,
210 0x0000046f, 232 0x0000046f,
211/* 0x0324: memx_func_next */ 233/* 0x037c: memx_func_next */
212 0x00000001, 234 0x00000001,
213 0x00000000, 235 0x00000000,
214 0x00000496, 236 0x00000496,
@@ -221,8 +243,17 @@ uint32_t nva3_pwr_data[] = {
221 0x00010004, 243 0x00010004,
222 0x00000000, 244 0x00000000,
223 0x000004fc, 245 0x000004fc,
224/* 0x0354: memx_func_tail */ 246/* 0x03ac: memx_func_tail */
225/* 0x0354: memx_data_head */ 247/* 0x03ac: memx_data_head */
248 0x00000000,
249 0x00000000,
250 0x00000000,
251 0x00000000,
252 0x00000000,
253 0x00000000,
254 0x00000000,
255 0x00000000,
256 0x00000000,
226 0x00000000, 257 0x00000000,
227 0x00000000, 258 0x00000000,
228 0x00000000, 259 0x00000000,
@@ -726,6 +757,43 @@ uint32_t nva3_pwr_data[] = {
726 0x00000000, 757 0x00000000,
727 0x00000000, 758 0x00000000,
728 0x00000000, 759 0x00000000,
760/* 0x0bac: memx_data_tail */
761/* 0x0bac: i2c_scl_map */
762 0x00001000,
763 0x00004000,
764 0x00010000,
765 0x00000100,
766 0x00040000,
767 0x00100000,
768 0x00400000,
769 0x01000000,
770 0x04000000,
771 0x10000000,
772/* 0x0bd4: i2c_sda_map */
773 0x00002000,
774 0x00008000,
775 0x00020000,
776 0x00000200,
777 0x00080000,
778 0x00200000,
779 0x00800000,
780 0x02000000,
781 0x08000000,
782 0x20000000,
783/* 0x0bfc: i2c_ctrl */
784 0x0000e138,
785 0x0000e150,
786 0x0000e168,
787 0x0000e180,
788 0x0000e254,
789 0x0000e274,
790 0x0000e764,
791 0x0000e780,
792 0x0000e79c,
793 0x0000e7b8,
794 0x00000000,
795 0x00000000,
796 0x00000000,
729 0x00000000, 797 0x00000000,
730 0x00000000, 798 0x00000000,
731 0x00000000, 799 0x00000000,
@@ -735,7 +803,6 @@ uint32_t nva3_pwr_data[] = {
735 0x00000000, 803 0x00000000,
736 0x00000000, 804 0x00000000,
737 0x00000000, 805 0x00000000,
738/* 0x0b54: memx_data_tail */
739 0x00000000, 806 0x00000000,
740 0x00000000, 807 0x00000000,
741 0x00000000, 808 0x00000000,
@@ -845,21 +912,21 @@ uint32_t nva3_pwr_code[] = {
845 0x9800f8df, 912 0x9800f8df,
846 0x96b003e9, 913 0x96b003e9,
847 0x2a0bf400, 914 0x2a0bf400,
848 0xbb840a98, 915 0xbb9a0a98,
849 0x1cf4029a, 916 0x1cf4029a,
850 0x01d7f00f, 917 0x01d7f00f,
851 0x025421f5, 918 0x025421f5,
852 0x0ef494bd, 919 0x0ef494bd,
853/* 0x00e9: intr_watchdog_next_time */ 920/* 0x00e9: intr_watchdog_next_time */
854 0x850a9815, 921 0x9b0a9815,
855 0xf400a6b0, 922 0xf400a6b0,
856 0x9ab8090b, 923 0x9ab8090b,
857 0x061cf406, 924 0x061cf406,
858/* 0x00f8: intr_watchdog_next_time_set */ 925/* 0x00f8: intr_watchdog_next_time_set */
859/* 0x00fb: intr_watchdog_next_proc */ 926/* 0x00fb: intr_watchdog_next_proc */
860 0x80850980, 927 0x809b0980,
861 0xe0b603e9, 928 0xe0b603e9,
862 0x10e6b158, 929 0x68e6b158,
863 0xc61bf402, 930 0xc61bf402,
864/* 0x010a: intr */ 931/* 0x010a: intr */
865 0x00f900f8, 932 0x00f900f8,
@@ -880,15 +947,15 @@ uint32_t nva3_pwr_code[] = {
880 0x0088cf06, 947 0x0088cf06,
881 0xf40289c4, 948 0xf40289c4,
882 0x0080230b, 949 0x0080230b,
883 0x58e7f085, 950 0x58e7f09b,
884 0x98cb21f4, 951 0x98cb21f4,
885 0x96b08509, 952 0x96b09b09,
886 0x110bf400, 953 0x110bf400,
887 0xb63407f0, 954 0xb63407f0,
888 0x09d00604, 955 0x09d00604,
889 0x8004bd00, 956 0x8004bd00,
890/* 0x016e: intr_skip_watchdog */ 957/* 0x016e: intr_skip_watchdog */
891 0x89e48409, 958 0x89e49a09,
892 0x0bf40800, 959 0x0bf40800,
893 0x8897f148, 960 0x8897f148,
894 0x0694b606, 961 0x0694b606,
@@ -948,7 +1015,7 @@ uint32_t nva3_pwr_code[] = {
948 0x000ed006, 1015 0x000ed006,
949 0x0e8004bd, 1016 0x0e8004bd,
950/* 0x0241: timer_enable */ 1017/* 0x0241: timer_enable */
951 0x0187f084, 1018 0x0187f09a,
952 0xb63807f0, 1019 0xb63807f0,
953 0x08d00604, 1020 0x08d00604,
954/* 0x024f: timer_done */ 1021/* 0x024f: timer_done */
@@ -979,7 +1046,7 @@ uint32_t nva3_pwr_code[] = {
979 0xb8008a98, 1046 0xb8008a98,
980 0x0bf406ae, 1047 0x0bf406ae,
981 0x5880b610, 1048 0x5880b610,
982 0x021086b1, 1049 0x026886b1,
983 0xf4f01bf4, 1050 0xf4f01bf4,
984/* 0x02b2: find_done */ 1051/* 0x02b2: find_done */
985 0x8eb90132, 1052 0x8eb90132,
@@ -1049,7 +1116,7 @@ uint32_t nva3_pwr_code[] = {
1049 0x320bf406, 1116 0x320bf406,
1050 0x94071ec4, 1117 0x94071ec4,
1051 0xe0b704ee, 1118 0xe0b704ee,
1052 0xeb980218, 1119 0xeb980270,
1053 0x02ec9803, 1120 0x02ec9803,
1054 0x9801ed98, 1121 0x9801ed98,
1055 0x21f500ee, 1122 0x21f500ee,
@@ -1075,7 +1142,7 @@ uint32_t nva3_pwr_code[] = {
1075 0xe60bf406, 1142 0xe60bf406,
1076 0xb60723c4, 1143 0xb60723c4,
1077 0x30b70434, 1144 0x30b70434,
1078 0x3b800298, 1145 0x3b8002f0,
1079 0x023c8003, 1146 0x023c8003,
1080 0x80013d80, 1147 0x80013d80,
1081 0x20b6003e, 1148 0x20b6003e,
@@ -1090,13 +1157,13 @@ uint32_t nva3_pwr_code[] = {
1090/* 0x0430: host_init */ 1157/* 0x0430: host_init */
1091 0x008017f1, 1158 0x008017f1,
1092 0xf11014b6, 1159 0xf11014b6,
1093 0xf1021815, 1160 0xf1027015,
1094 0xb604d007, 1161 0xb604d007,
1095 0x01d00604, 1162 0x01d00604,
1096 0xf104bd00, 1163 0xf104bd00,
1097 0xb6008017, 1164 0xb6008017,
1098 0x15f11014, 1165 0x15f11014,
1099 0x07f10298, 1166 0x07f102f0,
1100 0x04b604dc, 1167 0x04b604dc,
1101 0x0001d006, 1168 0x0001d006,
1102 0x17f004bd, 1169 0x17f004bd,
@@ -1156,14 +1223,14 @@ uint32_t nva3_pwr_code[] = {
1156 0x00139802, 1223 0x00139802,
1157 0x950410b6, 1224 0x950410b6,
1158 0x30f01034, 1225 0x30f01034,
1159 0xc835980c, 1226 0xde35980c,
1160 0x12b855f9, 1227 0x12b855f9,
1161 0xec1ef406, 1228 0xec1ef406,
1162 0xe0fcd0fc, 1229 0xe0fcd0fc,
1163 0x02b921f5, 1230 0x02b921f5,
1164/* 0x0532: memx_info */ 1231/* 0x0532: memx_info */
1165 0xc7f100f8, 1232 0xc7f100f8,
1166 0xb7f10354, 1233 0xb7f103ac,
1167 0x21f50800, 1234 0x21f50800,
1168 0x00f802b9, 1235 0x00f802b9,
1169/* 0x0540: memx_recv */ 1236/* 0x0540: memx_recv */
@@ -1175,7 +1242,312 @@ uint32_t nva3_pwr_code[] = {
1175/* 0x0550: perf_recv */ 1242/* 0x0550: perf_recv */
1176/* 0x0552: perf_init */ 1243/* 0x0552: perf_init */
1177 0x00f800f8, 1244 0x00f800f8,
1178/* 0x0554: test_recv */ 1245/* 0x0554: i2c_drive_scl */
1246 0xf40036b0,
1247 0x07f1110b,
1248 0x04b607e0,
1249 0x0001d006,
1250 0x00f804bd,
1251/* 0x0568: i2c_drive_scl_lo */
1252 0x07e407f1,
1253 0xd00604b6,
1254 0x04bd0001,
1255/* 0x0576: i2c_drive_sda */
1256 0x36b000f8,
1257 0x110bf400,
1258 0x07e007f1,
1259 0xd00604b6,
1260 0x04bd0002,
1261/* 0x058a: i2c_drive_sda_lo */
1262 0x07f100f8,
1263 0x04b607e4,
1264 0x0002d006,
1265 0x00f804bd,
1266/* 0x0598: i2c_sense_scl */
1267 0xf10132f4,
1268 0xb607c437,
1269 0x33cf0634,
1270 0x0431fd00,
1271 0xf4060bf4,
1272/* 0x05ae: i2c_sense_scl_done */
1273 0x00f80131,
1274/* 0x05b0: i2c_sense_sda */
1275 0xf10132f4,
1276 0xb607c437,
1277 0x33cf0634,
1278 0x0432fd00,
1279 0xf4060bf4,
1280/* 0x05c6: i2c_sense_sda_done */
1281 0x00f80131,
1282/* 0x05c8: i2c_raise_scl */
1283 0x47f140f9,
1284 0x37f00898,
1285 0x5421f501,
1286/* 0x05d5: i2c_raise_scl_wait */
1287 0xe8e7f105,
1288 0x7f21f403,
1289 0x059821f5,
1290 0xb60901f4,
1291 0x1bf40142,
1292/* 0x05e9: i2c_raise_scl_done */
1293 0xf840fcef,
1294/* 0x05ed: i2c_start */
1295 0x9821f500,
1296 0x0d11f405,
1297 0x05b021f5,
1298 0xf40611f4,
1299/* 0x05fe: i2c_start_rep */
1300 0x37f0300e,
1301 0x5421f500,
1302 0x0137f005,
1303 0x057621f5,
1304 0xb60076bb,
1305 0x50f90465,
1306 0xbb046594,
1307 0x50bd0256,
1308 0xfc0475fd,
1309 0xc821f550,
1310 0x0464b605,
1311/* 0x062b: i2c_start_send */
1312 0xf01f11f4,
1313 0x21f50037,
1314 0xe7f10576,
1315 0x21f41388,
1316 0x0037f07f,
1317 0x055421f5,
1318 0x1388e7f1,
1319/* 0x0647: i2c_start_out */
1320 0xf87f21f4,
1321/* 0x0649: i2c_stop */
1322 0x0037f000,
1323 0x055421f5,
1324 0xf50037f0,
1325 0xf1057621,
1326 0xf403e8e7,
1327 0x37f07f21,
1328 0x5421f501,
1329 0x88e7f105,
1330 0x7f21f413,
1331 0xf50137f0,
1332 0xf1057621,
1333 0xf41388e7,
1334 0x00f87f21,
1335/* 0x067c: i2c_bitw */
1336 0x057621f5,
1337 0x03e8e7f1,
1338 0xbb7f21f4,
1339 0x65b60076,
1340 0x9450f904,
1341 0x56bb0465,
1342 0xfd50bd02,
1343 0x50fc0475,
1344 0x05c821f5,
1345 0xf40464b6,
1346 0xe7f11811,
1347 0x21f41388,
1348 0x0037f07f,
1349 0x055421f5,
1350 0x1388e7f1,
1351/* 0x06bb: i2c_bitw_out */
1352 0xf87f21f4,
1353/* 0x06bd: i2c_bitr */
1354 0x0137f000,
1355 0x057621f5,
1356 0x03e8e7f1,
1357 0xbb7f21f4,
1358 0x65b60076,
1359 0x9450f904,
1360 0x56bb0465,
1361 0xfd50bd02,
1362 0x50fc0475,
1363 0x05c821f5,
1364 0xf40464b6,
1365 0x21f51b11,
1366 0x37f005b0,
1367 0x5421f500,
1368 0x88e7f105,
1369 0x7f21f413,
1370 0xf4013cf0,
1371/* 0x0702: i2c_bitr_done */
1372 0x00f80131,
1373/* 0x0704: i2c_get_byte */
1374 0xf00057f0,
1375/* 0x070a: i2c_get_byte_next */
1376 0x54b60847,
1377 0x0076bb01,
1378 0xf90465b6,
1379 0x04659450,
1380 0xbd0256bb,
1381 0x0475fd50,
1382 0x21f550fc,
1383 0x64b606bd,
1384 0x2b11f404,
1385 0xb60553fd,
1386 0x1bf40142,
1387 0x0137f0d8,
1388 0xb60076bb,
1389 0x50f90465,
1390 0xbb046594,
1391 0x50bd0256,
1392 0xfc0475fd,
1393 0x7c21f550,
1394 0x0464b606,
1395/* 0x0754: i2c_get_byte_done */
1396/* 0x0756: i2c_put_byte */
1397 0x47f000f8,
1398/* 0x0759: i2c_put_byte_next */
1399 0x0142b608,
1400 0xbb3854ff,
1401 0x65b60076,
1402 0x9450f904,
1403 0x56bb0465,
1404 0xfd50bd02,
1405 0x50fc0475,
1406 0x067c21f5,
1407 0xf40464b6,
1408 0x46b03411,
1409 0xd81bf400,
1410 0xb60076bb,
1411 0x50f90465,
1412 0xbb046594,
1413 0x50bd0256,
1414 0xfc0475fd,
1415 0xbd21f550,
1416 0x0464b606,
1417 0xbb0f11f4,
1418 0x36b00076,
1419 0x061bf401,
1420/* 0x07af: i2c_put_byte_done */
1421 0xf80132f4,
1422/* 0x07b1: i2c_addr */
1423 0x0076bb00,
1424 0xf90465b6,
1425 0x04659450,
1426 0xbd0256bb,
1427 0x0475fd50,
1428 0x21f550fc,
1429 0x64b605ed,
1430 0x2911f404,
1431 0x012ec3e7,
1432 0xfd0134b6,
1433 0x76bb0553,
1434 0x0465b600,
1435 0x659450f9,
1436 0x0256bb04,
1437 0x75fd50bd,
1438 0xf550fc04,
1439 0xb6075621,
1440/* 0x07f6: i2c_addr_done */
1441 0x00f80464,
1442/* 0x07f8: i2c_acquire_addr */
1443 0xb6f8cec7,
1444 0xe0b702e4,
1445 0xee980bfc,
1446/* 0x0807: i2c_acquire */
1447 0xf500f800,
1448 0xf407f821,
1449 0xd9f00421,
1450 0x3f21f403,
1451/* 0x0816: i2c_release */
1452 0x21f500f8,
1453 0x21f407f8,
1454 0x03daf004,
1455 0xf83f21f4,
1456/* 0x0825: i2c_recv */
1457 0x0132f400,
1458 0xb6f8c1c7,
1459 0x16b00214,
1460 0x3a1ff528,
1461 0xd413a001,
1462 0x0032980b,
1463 0x0bac13a0,
1464 0xf4003198,
1465 0xd0f90231,
1466 0xd0f9e0f9,
1467 0x000067f1,
1468 0x100063f1,
1469 0xbb016792,
1470 0x65b60076,
1471 0x9450f904,
1472 0x56bb0465,
1473 0xfd50bd02,
1474 0x50fc0475,
1475 0x080721f5,
1476 0xfc0464b6,
1477 0x00d6b0d0,
1478 0x00b31bf5,
1479 0xbb0057f0,
1480 0x65b60076,
1481 0x9450f904,
1482 0x56bb0465,
1483 0xfd50bd02,
1484 0x50fc0475,
1485 0x07b121f5,
1486 0xf50464b6,
1487 0xc700d011,
1488 0x76bbe0c5,
1489 0x0465b600,
1490 0x659450f9,
1491 0x0256bb04,
1492 0x75fd50bd,
1493 0xf550fc04,
1494 0xb6075621,
1495 0x11f50464,
1496 0x57f000ad,
1497 0x0076bb01,
1498 0xf90465b6,
1499 0x04659450,
1500 0xbd0256bb,
1501 0x0475fd50,
1502 0x21f550fc,
1503 0x64b607b1,
1504 0x8a11f504,
1505 0x0076bb00,
1506 0xf90465b6,
1507 0x04659450,
1508 0xbd0256bb,
1509 0x0475fd50,
1510 0x21f550fc,
1511 0x64b60704,
1512 0x6a11f404,
1513 0xbbe05bcb,
1514 0x65b60076,
1515 0x9450f904,
1516 0x56bb0465,
1517 0xfd50bd02,
1518 0x50fc0475,
1519 0x064921f5,
1520 0xb90464b6,
1521 0x74bd025b,
1522/* 0x092b: i2c_recv_not_rd08 */
1523 0xb0430ef4,
1524 0x1bf401d6,
1525 0x0057f03d,
1526 0x07b121f5,
1527 0xc73311f4,
1528 0x21f5e0c5,
1529 0x11f40756,
1530 0x0057f029,
1531 0x07b121f5,
1532 0xc71f11f4,
1533 0x21f5e0b5,
1534 0x11f40756,
1535 0x4921f515,
1536 0xc774bd06,
1537 0x1bf408c5,
1538 0x0232f409,
1539/* 0x096b: i2c_recv_not_wr08 */
1540/* 0x096b: i2c_recv_done */
1541 0xc7030ef4,
1542 0x21f5f8ce,
1543 0xe0fc0816,
1544 0x12f4d0fc,
1545 0x027cb90a,
1546 0x02b921f5,
1547/* 0x0980: i2c_recv_exit */
1548/* 0x0982: i2c_init */
1549 0x00f800f8,
1550/* 0x0984: test_recv */
1179 0x05d817f1, 1551 0x05d817f1,
1180 0xcf0614b6, 1552 0xcf0614b6,
1181 0x10b60011, 1553 0x10b60011,
@@ -1185,12 +1557,12 @@ uint32_t nva3_pwr_code[] = {
1185 0x00e7f104, 1557 0x00e7f104,
1186 0x4fe3f1d9, 1558 0x4fe3f1d9,
1187 0xf521f513, 1559 0xf521f513,
1188/* 0x057b: test_init */ 1560/* 0x09ab: test_init */
1189 0xf100f801, 1561 0xf100f801,
1190 0xf50800e7, 1562 0xf50800e7,
1191 0xf801f521, 1563 0xf801f521,
1192/* 0x0585: idle_recv */ 1564/* 0x09b5: idle_recv */
1193/* 0x0587: idle */ 1565/* 0x09b7: idle */
1194 0xf400f800, 1566 0xf400f800,
1195 0x17f10031, 1567 0x17f10031,
1196 0x14b605d4, 1568 0x14b605d4,
@@ -1198,32 +1570,20 @@ uint32_t nva3_pwr_code[] = {
1198 0xf10110b6, 1570 0xf10110b6,
1199 0xb605d407, 1571 0xb605d407,
1200 0x01d00604, 1572 0x01d00604,
1201/* 0x05a3: idle_loop */ 1573/* 0x09d3: idle_loop */
1202 0xf004bd00, 1574 0xf004bd00,
1203 0x32f45817, 1575 0x32f45817,
1204/* 0x05a9: idle_proc */ 1576/* 0x09d9: idle_proc */
1205/* 0x05a9: idle_proc_exec */ 1577/* 0x09d9: idle_proc_exec */
1206 0xb910f902, 1578 0xb910f902,
1207 0x21f5021e, 1579 0x21f5021e,
1208 0x10fc02c2, 1580 0x10fc02c2,
1209 0xf40911f4, 1581 0xf40911f4,
1210 0x0ef40231, 1582 0x0ef40231,
1211/* 0x05bd: idle_proc_next */ 1583/* 0x09ed: idle_proc_next */
1212 0x5810b6ef, 1584 0x5810b6ef,
1213 0xf4061fb8, 1585 0xf4061fb8,
1214 0x02f4e61b, 1586 0x02f4e61b,
1215 0x0028f4dd, 1587 0x0028f4dd,
1216 0x00bb0ef4, 1588 0x00bb0ef4,
1217 0x00000000,
1218 0x00000000,
1219 0x00000000,
1220 0x00000000,
1221 0x00000000,
1222 0x00000000,
1223 0x00000000,
1224 0x00000000,
1225 0x00000000,
1226 0x00000000,
1227 0x00000000,
1228 0x00000000,
1229}; 1589};
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc
index eaa64da68e36..48f79434a449 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc
@@ -37,6 +37,7 @@
37#include "host.fuc" 37#include "host.fuc"
38#include "memx.fuc" 38#include "memx.fuc"
39#include "perf.fuc" 39#include "perf.fuc"
40#include "i2c_.fuc"
40#include "test.fuc" 41#include "test.fuc"
41#include "idle.fuc" 42#include "idle.fuc"
42#undef INCLUDE_PROC 43#undef INCLUDE_PROC
@@ -46,6 +47,7 @@
46#include "host.fuc" 47#include "host.fuc"
47#include "memx.fuc" 48#include "memx.fuc"
48#include "perf.fuc" 49#include "perf.fuc"
50#include "i2c_.fuc"
49#include "test.fuc" 51#include "test.fuc"
50#include "idle.fuc" 52#include "idle.fuc"
51#undef INCLUDE_DATA 53#undef INCLUDE_DATA
@@ -57,6 +59,7 @@
57#include "host.fuc" 59#include "host.fuc"
58#include "memx.fuc" 60#include "memx.fuc"
59#include "perf.fuc" 61#include "perf.fuc"
62#include "i2c_.fuc"
60#include "test.fuc" 63#include "test.fuc"
61#include "idle.fuc" 64#include "idle.fuc"
62#undef INCLUDE_CODE 65#undef INCLUDE_CODE
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc.h b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc.h
index 1f496185746c..4dba00d2dd1a 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc.h
@@ -89,9 +89,31 @@ uint32_t nvc0_pwr_data[] = {
89 0x00000000, 89 0x00000000,
90 0x00000000, 90 0x00000000,
91 0x00000000, 91 0x00000000,
92 0x5f433249,
93 0x00000982,
94 0x00000825,
95 0x00000000,
96 0x00000000,
97 0x00000000,
98 0x00000000,
99 0x00000000,
100 0x00000000,
101 0x00000000,
102 0x00000000,
103 0x00000000,
104 0x00000000,
105 0x00000000,
106 0x00000000,
107 0x00000000,
108 0x00000000,
109 0x00000000,
110 0x00000000,
111 0x00000000,
112 0x00000000,
113 0x00000000,
92 0x54534554, 114 0x54534554,
93 0x0000057b, 115 0x000009ab,
94 0x00000554, 116 0x00000984,
95 0x00000000, 117 0x00000000,
96 0x00000000, 118 0x00000000,
97 0x00000000, 119 0x00000000,
@@ -112,8 +134,8 @@ uint32_t nvc0_pwr_data[] = {
112 0x00000000, 134 0x00000000,
113 0x00000000, 135 0x00000000,
114 0x454c4449, 136 0x454c4449,
115 0x00000587, 137 0x000009b7,
116 0x00000585, 138 0x000009b5,
117 0x00000000, 139 0x00000000,
118 0x00000000, 140 0x00000000,
119 0x00000000, 141 0x00000000,
@@ -133,12 +155,12 @@ uint32_t nvc0_pwr_data[] = {
133 0x00000000, 155 0x00000000,
134 0x00000000, 156 0x00000000,
135 0x00000000, 157 0x00000000,
136/* 0x0210: proc_list_tail */ 158/* 0x0268: proc_list_tail */
137/* 0x0210: time_prev */ 159/* 0x0268: time_prev */
138 0x00000000, 160 0x00000000,
139/* 0x0214: time_next */ 161/* 0x026c: time_next */
140 0x00000000, 162 0x00000000,
141/* 0x0218: fifo_queue */ 163/* 0x0270: fifo_queue */
142 0x00000000, 164 0x00000000,
143 0x00000000, 165 0x00000000,
144 0x00000000, 166 0x00000000,
@@ -171,7 +193,7 @@ uint32_t nvc0_pwr_data[] = {
171 0x00000000, 193 0x00000000,
172 0x00000000, 194 0x00000000,
173 0x00000000, 195 0x00000000,
174/* 0x0298: rfifo_queue */ 196/* 0x02f0: rfifo_queue */
175 0x00000000, 197 0x00000000,
176 0x00000000, 198 0x00000000,
177 0x00000000, 199 0x00000000,
@@ -204,11 +226,11 @@ uint32_t nvc0_pwr_data[] = {
204 0x00000000, 226 0x00000000,
205 0x00000000, 227 0x00000000,
206 0x00000000, 228 0x00000000,
207/* 0x0318: memx_func_head */ 229/* 0x0370: memx_func_head */
208 0x00010000, 230 0x00010000,
209 0x00000000, 231 0x00000000,
210 0x0000046f, 232 0x0000046f,
211/* 0x0324: memx_func_next */ 233/* 0x037c: memx_func_next */
212 0x00000001, 234 0x00000001,
213 0x00000000, 235 0x00000000,
214 0x00000496, 236 0x00000496,
@@ -221,8 +243,17 @@ uint32_t nvc0_pwr_data[] = {
221 0x00010004, 243 0x00010004,
222 0x00000000, 244 0x00000000,
223 0x000004fc, 245 0x000004fc,
224/* 0x0354: memx_func_tail */ 246/* 0x03ac: memx_func_tail */
225/* 0x0354: memx_data_head */ 247/* 0x03ac: memx_data_head */
248 0x00000000,
249 0x00000000,
250 0x00000000,
251 0x00000000,
252 0x00000000,
253 0x00000000,
254 0x00000000,
255 0x00000000,
256 0x00000000,
226 0x00000000, 257 0x00000000,
227 0x00000000, 258 0x00000000,
228 0x00000000, 259 0x00000000,
@@ -726,6 +757,43 @@ uint32_t nvc0_pwr_data[] = {
726 0x00000000, 757 0x00000000,
727 0x00000000, 758 0x00000000,
728 0x00000000, 759 0x00000000,
760/* 0x0bac: memx_data_tail */
761/* 0x0bac: i2c_scl_map */
762 0x00001000,
763 0x00004000,
764 0x00010000,
765 0x00000100,
766 0x00040000,
767 0x00100000,
768 0x00400000,
769 0x01000000,
770 0x04000000,
771 0x10000000,
772/* 0x0bd4: i2c_sda_map */
773 0x00002000,
774 0x00008000,
775 0x00020000,
776 0x00000200,
777 0x00080000,
778 0x00200000,
779 0x00800000,
780 0x02000000,
781 0x08000000,
782 0x20000000,
783/* 0x0bfc: i2c_ctrl */
784 0x0000e138,
785 0x0000e150,
786 0x0000e168,
787 0x0000e180,
788 0x0000e254,
789 0x0000e274,
790 0x0000e764,
791 0x0000e780,
792 0x0000e79c,
793 0x0000e7b8,
794 0x00000000,
795 0x00000000,
796 0x00000000,
729 0x00000000, 797 0x00000000,
730 0x00000000, 798 0x00000000,
731 0x00000000, 799 0x00000000,
@@ -735,7 +803,6 @@ uint32_t nvc0_pwr_data[] = {
735 0x00000000, 803 0x00000000,
736 0x00000000, 804 0x00000000,
737 0x00000000, 805 0x00000000,
738/* 0x0b54: memx_data_tail */
739 0x00000000, 806 0x00000000,
740 0x00000000, 807 0x00000000,
741 0x00000000, 808 0x00000000,
@@ -845,21 +912,21 @@ uint32_t nvc0_pwr_code[] = {
845 0x9800f8df, 912 0x9800f8df,
846 0x96b003e9, 913 0x96b003e9,
847 0x2a0bf400, 914 0x2a0bf400,
848 0xbb840a98, 915 0xbb9a0a98,
849 0x1cf4029a, 916 0x1cf4029a,
850 0x01d7f00f, 917 0x01d7f00f,
851 0x025421f5, 918 0x025421f5,
852 0x0ef494bd, 919 0x0ef494bd,
853/* 0x00e9: intr_watchdog_next_time */ 920/* 0x00e9: intr_watchdog_next_time */
854 0x850a9815, 921 0x9b0a9815,
855 0xf400a6b0, 922 0xf400a6b0,
856 0x9ab8090b, 923 0x9ab8090b,
857 0x061cf406, 924 0x061cf406,
858/* 0x00f8: intr_watchdog_next_time_set */ 925/* 0x00f8: intr_watchdog_next_time_set */
859/* 0x00fb: intr_watchdog_next_proc */ 926/* 0x00fb: intr_watchdog_next_proc */
860 0x80850980, 927 0x809b0980,
861 0xe0b603e9, 928 0xe0b603e9,
862 0x10e6b158, 929 0x68e6b158,
863 0xc61bf402, 930 0xc61bf402,
864/* 0x010a: intr */ 931/* 0x010a: intr */
865 0x00f900f8, 932 0x00f900f8,
@@ -880,15 +947,15 @@ uint32_t nvc0_pwr_code[] = {
880 0x0088cf06, 947 0x0088cf06,
881 0xf40289c4, 948 0xf40289c4,
882 0x0080230b, 949 0x0080230b,
883 0x58e7f085, 950 0x58e7f09b,
884 0x98cb21f4, 951 0x98cb21f4,
885 0x96b08509, 952 0x96b09b09,
886 0x110bf400, 953 0x110bf400,
887 0xb63407f0, 954 0xb63407f0,
888 0x09d00604, 955 0x09d00604,
889 0x8004bd00, 956 0x8004bd00,
890/* 0x016e: intr_skip_watchdog */ 957/* 0x016e: intr_skip_watchdog */
891 0x89e48409, 958 0x89e49a09,
892 0x0bf40800, 959 0x0bf40800,
893 0x8897f148, 960 0x8897f148,
894 0x0694b606, 961 0x0694b606,
@@ -948,7 +1015,7 @@ uint32_t nvc0_pwr_code[] = {
948 0x000ed006, 1015 0x000ed006,
949 0x0e8004bd, 1016 0x0e8004bd,
950/* 0x0241: timer_enable */ 1017/* 0x0241: timer_enable */
951 0x0187f084, 1018 0x0187f09a,
952 0xb63807f0, 1019 0xb63807f0,
953 0x08d00604, 1020 0x08d00604,
954/* 0x024f: timer_done */ 1021/* 0x024f: timer_done */
@@ -979,7 +1046,7 @@ uint32_t nvc0_pwr_code[] = {
979 0xb8008a98, 1046 0xb8008a98,
980 0x0bf406ae, 1047 0x0bf406ae,
981 0x5880b610, 1048 0x5880b610,
982 0x021086b1, 1049 0x026886b1,
983 0xf4f01bf4, 1050 0xf4f01bf4,
984/* 0x02b2: find_done */ 1051/* 0x02b2: find_done */
985 0x8eb90132, 1052 0x8eb90132,
@@ -1049,7 +1116,7 @@ uint32_t nvc0_pwr_code[] = {
1049 0x320bf406, 1116 0x320bf406,
1050 0x94071ec4, 1117 0x94071ec4,
1051 0xe0b704ee, 1118 0xe0b704ee,
1052 0xeb980218, 1119 0xeb980270,
1053 0x02ec9803, 1120 0x02ec9803,
1054 0x9801ed98, 1121 0x9801ed98,
1055 0x21f500ee, 1122 0x21f500ee,
@@ -1075,7 +1142,7 @@ uint32_t nvc0_pwr_code[] = {
1075 0xe60bf406, 1142 0xe60bf406,
1076 0xb60723c4, 1143 0xb60723c4,
1077 0x30b70434, 1144 0x30b70434,
1078 0x3b800298, 1145 0x3b8002f0,
1079 0x023c8003, 1146 0x023c8003,
1080 0x80013d80, 1147 0x80013d80,
1081 0x20b6003e, 1148 0x20b6003e,
@@ -1090,13 +1157,13 @@ uint32_t nvc0_pwr_code[] = {
1090/* 0x0430: host_init */ 1157/* 0x0430: host_init */
1091 0x008017f1, 1158 0x008017f1,
1092 0xf11014b6, 1159 0xf11014b6,
1093 0xf1021815, 1160 0xf1027015,
1094 0xb604d007, 1161 0xb604d007,
1095 0x01d00604, 1162 0x01d00604,
1096 0xf104bd00, 1163 0xf104bd00,
1097 0xb6008017, 1164 0xb6008017,
1098 0x15f11014, 1165 0x15f11014,
1099 0x07f10298, 1166 0x07f102f0,
1100 0x04b604dc, 1167 0x04b604dc,
1101 0x0001d006, 1168 0x0001d006,
1102 0x17f004bd, 1169 0x17f004bd,
@@ -1156,14 +1223,14 @@ uint32_t nvc0_pwr_code[] = {
1156 0x00139802, 1223 0x00139802,
1157 0x950410b6, 1224 0x950410b6,
1158 0x30f01034, 1225 0x30f01034,
1159 0xc835980c, 1226 0xde35980c,
1160 0x12b855f9, 1227 0x12b855f9,
1161 0xec1ef406, 1228 0xec1ef406,
1162 0xe0fcd0fc, 1229 0xe0fcd0fc,
1163 0x02b921f5, 1230 0x02b921f5,
1164/* 0x0532: memx_info */ 1231/* 0x0532: memx_info */
1165 0xc7f100f8, 1232 0xc7f100f8,
1166 0xb7f10354, 1233 0xb7f103ac,
1167 0x21f50800, 1234 0x21f50800,
1168 0x00f802b9, 1235 0x00f802b9,
1169/* 0x0540: memx_recv */ 1236/* 0x0540: memx_recv */
@@ -1175,7 +1242,312 @@ uint32_t nvc0_pwr_code[] = {
1175/* 0x0550: perf_recv */ 1242/* 0x0550: perf_recv */
1176/* 0x0552: perf_init */ 1243/* 0x0552: perf_init */
1177 0x00f800f8, 1244 0x00f800f8,
1178/* 0x0554: test_recv */ 1245/* 0x0554: i2c_drive_scl */
1246 0xf40036b0,
1247 0x07f1110b,
1248 0x04b607e0,
1249 0x0001d006,
1250 0x00f804bd,
1251/* 0x0568: i2c_drive_scl_lo */
1252 0x07e407f1,
1253 0xd00604b6,
1254 0x04bd0001,
1255/* 0x0576: i2c_drive_sda */
1256 0x36b000f8,
1257 0x110bf400,
1258 0x07e007f1,
1259 0xd00604b6,
1260 0x04bd0002,
1261/* 0x058a: i2c_drive_sda_lo */
1262 0x07f100f8,
1263 0x04b607e4,
1264 0x0002d006,
1265 0x00f804bd,
1266/* 0x0598: i2c_sense_scl */
1267 0xf10132f4,
1268 0xb607c437,
1269 0x33cf0634,
1270 0x0431fd00,
1271 0xf4060bf4,
1272/* 0x05ae: i2c_sense_scl_done */
1273 0x00f80131,
1274/* 0x05b0: i2c_sense_sda */
1275 0xf10132f4,
1276 0xb607c437,
1277 0x33cf0634,
1278 0x0432fd00,
1279 0xf4060bf4,
1280/* 0x05c6: i2c_sense_sda_done */
1281 0x00f80131,
1282/* 0x05c8: i2c_raise_scl */
1283 0x47f140f9,
1284 0x37f00898,
1285 0x5421f501,
1286/* 0x05d5: i2c_raise_scl_wait */
1287 0xe8e7f105,
1288 0x7f21f403,
1289 0x059821f5,
1290 0xb60901f4,
1291 0x1bf40142,
1292/* 0x05e9: i2c_raise_scl_done */
1293 0xf840fcef,
1294/* 0x05ed: i2c_start */
1295 0x9821f500,
1296 0x0d11f405,
1297 0x05b021f5,
1298 0xf40611f4,
1299/* 0x05fe: i2c_start_rep */
1300 0x37f0300e,
1301 0x5421f500,
1302 0x0137f005,
1303 0x057621f5,
1304 0xb60076bb,
1305 0x50f90465,
1306 0xbb046594,
1307 0x50bd0256,
1308 0xfc0475fd,
1309 0xc821f550,
1310 0x0464b605,
1311/* 0x062b: i2c_start_send */
1312 0xf01f11f4,
1313 0x21f50037,
1314 0xe7f10576,
1315 0x21f41388,
1316 0x0037f07f,
1317 0x055421f5,
1318 0x1388e7f1,
1319/* 0x0647: i2c_start_out */
1320 0xf87f21f4,
1321/* 0x0649: i2c_stop */
1322 0x0037f000,
1323 0x055421f5,
1324 0xf50037f0,
1325 0xf1057621,
1326 0xf403e8e7,
1327 0x37f07f21,
1328 0x5421f501,
1329 0x88e7f105,
1330 0x7f21f413,
1331 0xf50137f0,
1332 0xf1057621,
1333 0xf41388e7,
1334 0x00f87f21,
1335/* 0x067c: i2c_bitw */
1336 0x057621f5,
1337 0x03e8e7f1,
1338 0xbb7f21f4,
1339 0x65b60076,
1340 0x9450f904,
1341 0x56bb0465,
1342 0xfd50bd02,
1343 0x50fc0475,
1344 0x05c821f5,
1345 0xf40464b6,
1346 0xe7f11811,
1347 0x21f41388,
1348 0x0037f07f,
1349 0x055421f5,
1350 0x1388e7f1,
1351/* 0x06bb: i2c_bitw_out */
1352 0xf87f21f4,
1353/* 0x06bd: i2c_bitr */
1354 0x0137f000,
1355 0x057621f5,
1356 0x03e8e7f1,
1357 0xbb7f21f4,
1358 0x65b60076,
1359 0x9450f904,
1360 0x56bb0465,
1361 0xfd50bd02,
1362 0x50fc0475,
1363 0x05c821f5,
1364 0xf40464b6,
1365 0x21f51b11,
1366 0x37f005b0,
1367 0x5421f500,
1368 0x88e7f105,
1369 0x7f21f413,
1370 0xf4013cf0,
1371/* 0x0702: i2c_bitr_done */
1372 0x00f80131,
1373/* 0x0704: i2c_get_byte */
1374 0xf00057f0,
1375/* 0x070a: i2c_get_byte_next */
1376 0x54b60847,
1377 0x0076bb01,
1378 0xf90465b6,
1379 0x04659450,
1380 0xbd0256bb,
1381 0x0475fd50,
1382 0x21f550fc,
1383 0x64b606bd,
1384 0x2b11f404,
1385 0xb60553fd,
1386 0x1bf40142,
1387 0x0137f0d8,
1388 0xb60076bb,
1389 0x50f90465,
1390 0xbb046594,
1391 0x50bd0256,
1392 0xfc0475fd,
1393 0x7c21f550,
1394 0x0464b606,
1395/* 0x0754: i2c_get_byte_done */
1396/* 0x0756: i2c_put_byte */
1397 0x47f000f8,
1398/* 0x0759: i2c_put_byte_next */
1399 0x0142b608,
1400 0xbb3854ff,
1401 0x65b60076,
1402 0x9450f904,
1403 0x56bb0465,
1404 0xfd50bd02,
1405 0x50fc0475,
1406 0x067c21f5,
1407 0xf40464b6,
1408 0x46b03411,
1409 0xd81bf400,
1410 0xb60076bb,
1411 0x50f90465,
1412 0xbb046594,
1413 0x50bd0256,
1414 0xfc0475fd,
1415 0xbd21f550,
1416 0x0464b606,
1417 0xbb0f11f4,
1418 0x36b00076,
1419 0x061bf401,
1420/* 0x07af: i2c_put_byte_done */
1421 0xf80132f4,
1422/* 0x07b1: i2c_addr */
1423 0x0076bb00,
1424 0xf90465b6,
1425 0x04659450,
1426 0xbd0256bb,
1427 0x0475fd50,
1428 0x21f550fc,
1429 0x64b605ed,
1430 0x2911f404,
1431 0x012ec3e7,
1432 0xfd0134b6,
1433 0x76bb0553,
1434 0x0465b600,
1435 0x659450f9,
1436 0x0256bb04,
1437 0x75fd50bd,
1438 0xf550fc04,
1439 0xb6075621,
1440/* 0x07f6: i2c_addr_done */
1441 0x00f80464,
1442/* 0x07f8: i2c_acquire_addr */
1443 0xb6f8cec7,
1444 0xe0b702e4,
1445 0xee980bfc,
1446/* 0x0807: i2c_acquire */
1447 0xf500f800,
1448 0xf407f821,
1449 0xd9f00421,
1450 0x3f21f403,
1451/* 0x0816: i2c_release */
1452 0x21f500f8,
1453 0x21f407f8,
1454 0x03daf004,
1455 0xf83f21f4,
1456/* 0x0825: i2c_recv */
1457 0x0132f400,
1458 0xb6f8c1c7,
1459 0x16b00214,
1460 0x3a1ff528,
1461 0xd413a001,
1462 0x0032980b,
1463 0x0bac13a0,
1464 0xf4003198,
1465 0xd0f90231,
1466 0xd0f9e0f9,
1467 0x000067f1,
1468 0x100063f1,
1469 0xbb016792,
1470 0x65b60076,
1471 0x9450f904,
1472 0x56bb0465,
1473 0xfd50bd02,
1474 0x50fc0475,
1475 0x080721f5,
1476 0xfc0464b6,
1477 0x00d6b0d0,
1478 0x00b31bf5,
1479 0xbb0057f0,
1480 0x65b60076,
1481 0x9450f904,
1482 0x56bb0465,
1483 0xfd50bd02,
1484 0x50fc0475,
1485 0x07b121f5,
1486 0xf50464b6,
1487 0xc700d011,
1488 0x76bbe0c5,
1489 0x0465b600,
1490 0x659450f9,
1491 0x0256bb04,
1492 0x75fd50bd,
1493 0xf550fc04,
1494 0xb6075621,
1495 0x11f50464,
1496 0x57f000ad,
1497 0x0076bb01,
1498 0xf90465b6,
1499 0x04659450,
1500 0xbd0256bb,
1501 0x0475fd50,
1502 0x21f550fc,
1503 0x64b607b1,
1504 0x8a11f504,
1505 0x0076bb00,
1506 0xf90465b6,
1507 0x04659450,
1508 0xbd0256bb,
1509 0x0475fd50,
1510 0x21f550fc,
1511 0x64b60704,
1512 0x6a11f404,
1513 0xbbe05bcb,
1514 0x65b60076,
1515 0x9450f904,
1516 0x56bb0465,
1517 0xfd50bd02,
1518 0x50fc0475,
1519 0x064921f5,
1520 0xb90464b6,
1521 0x74bd025b,
1522/* 0x092b: i2c_recv_not_rd08 */
1523 0xb0430ef4,
1524 0x1bf401d6,
1525 0x0057f03d,
1526 0x07b121f5,
1527 0xc73311f4,
1528 0x21f5e0c5,
1529 0x11f40756,
1530 0x0057f029,
1531 0x07b121f5,
1532 0xc71f11f4,
1533 0x21f5e0b5,
1534 0x11f40756,
1535 0x4921f515,
1536 0xc774bd06,
1537 0x1bf408c5,
1538 0x0232f409,
1539/* 0x096b: i2c_recv_not_wr08 */
1540/* 0x096b: i2c_recv_done */
1541 0xc7030ef4,
1542 0x21f5f8ce,
1543 0xe0fc0816,
1544 0x12f4d0fc,
1545 0x027cb90a,
1546 0x02b921f5,
1547/* 0x0980: i2c_recv_exit */
1548/* 0x0982: i2c_init */
1549 0x00f800f8,
1550/* 0x0984: test_recv */
1179 0x05d817f1, 1551 0x05d817f1,
1180 0xcf0614b6, 1552 0xcf0614b6,
1181 0x10b60011, 1553 0x10b60011,
@@ -1185,12 +1557,12 @@ uint32_t nvc0_pwr_code[] = {
1185 0x00e7f104, 1557 0x00e7f104,
1186 0x4fe3f1d9, 1558 0x4fe3f1d9,
1187 0xf521f513, 1559 0xf521f513,
1188/* 0x057b: test_init */ 1560/* 0x09ab: test_init */
1189 0xf100f801, 1561 0xf100f801,
1190 0xf50800e7, 1562 0xf50800e7,
1191 0xf801f521, 1563 0xf801f521,
1192/* 0x0585: idle_recv */ 1564/* 0x09b5: idle_recv */
1193/* 0x0587: idle */ 1565/* 0x09b7: idle */
1194 0xf400f800, 1566 0xf400f800,
1195 0x17f10031, 1567 0x17f10031,
1196 0x14b605d4, 1568 0x14b605d4,
@@ -1198,32 +1570,20 @@ uint32_t nvc0_pwr_code[] = {
1198 0xf10110b6, 1570 0xf10110b6,
1199 0xb605d407, 1571 0xb605d407,
1200 0x01d00604, 1572 0x01d00604,
1201/* 0x05a3: idle_loop */ 1573/* 0x09d3: idle_loop */
1202 0xf004bd00, 1574 0xf004bd00,
1203 0x32f45817, 1575 0x32f45817,
1204/* 0x05a9: idle_proc */ 1576/* 0x09d9: idle_proc */
1205/* 0x05a9: idle_proc_exec */ 1577/* 0x09d9: idle_proc_exec */
1206 0xb910f902, 1578 0xb910f902,
1207 0x21f5021e, 1579 0x21f5021e,
1208 0x10fc02c2, 1580 0x10fc02c2,
1209 0xf40911f4, 1581 0xf40911f4,
1210 0x0ef40231, 1582 0x0ef40231,
1211/* 0x05bd: idle_proc_next */ 1583/* 0x09ed: idle_proc_next */
1212 0x5810b6ef, 1584 0x5810b6ef,
1213 0xf4061fb8, 1585 0xf4061fb8,
1214 0x02f4e61b, 1586 0x02f4e61b,
1215 0x0028f4dd, 1587 0x0028f4dd,
1216 0x00bb0ef4, 1588 0x00bb0ef4,
1217 0x00000000,
1218 0x00000000,
1219 0x00000000,
1220 0x00000000,
1221 0x00000000,
1222 0x00000000,
1223 0x00000000,
1224 0x00000000,
1225 0x00000000,
1226 0x00000000,
1227 0x00000000,
1228 0x00000000,
1229}; 1589};
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc
index 32d65ea254dd..8a89dfe41ce1 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc
@@ -37,6 +37,7 @@
37#include "host.fuc" 37#include "host.fuc"
38#include "memx.fuc" 38#include "memx.fuc"
39#include "perf.fuc" 39#include "perf.fuc"
40#include "i2c_.fuc"
40#include "test.fuc" 41#include "test.fuc"
41#include "idle.fuc" 42#include "idle.fuc"
42#undef INCLUDE_PROC 43#undef INCLUDE_PROC
@@ -46,6 +47,7 @@
46#include "host.fuc" 47#include "host.fuc"
47#include "memx.fuc" 48#include "memx.fuc"
48#include "perf.fuc" 49#include "perf.fuc"
50#include "i2c_.fuc"
49#include "test.fuc" 51#include "test.fuc"
50#include "idle.fuc" 52#include "idle.fuc"
51#undef INCLUDE_DATA 53#undef INCLUDE_DATA
@@ -57,6 +59,7 @@
57#include "host.fuc" 59#include "host.fuc"
58#include "memx.fuc" 60#include "memx.fuc"
59#include "perf.fuc" 61#include "perf.fuc"
62#include "i2c_.fuc"
60#include "test.fuc" 63#include "test.fuc"
61#include "idle.fuc" 64#include "idle.fuc"
62#undef INCLUDE_CODE 65#undef INCLUDE_CODE
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc.h b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc.h
index c2be8dbdd98a..5e24c6bc041d 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc.h
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc.h
@@ -89,16 +89,9 @@ uint32_t nvd0_pwr_data[] = {
89 0x00000000, 89 0x00000000,
90 0x00000000, 90 0x00000000,
91 0x00000000, 91 0x00000000,
92 0x54534554, 92 0x5f433249,
93 0x000004eb, 93 0x000008e3,
94 0x000004ca, 94 0x00000786,
95 0x00000000,
96 0x00000000,
97 0x00000000,
98 0x00000000,
99 0x00000000,
100 0x00000000,
101 0x00000000,
102 0x00000000, 95 0x00000000,
103 0x00000000, 96 0x00000000,
104 0x00000000, 97 0x00000000,
@@ -111,16 +104,6 @@ uint32_t nvd0_pwr_data[] = {
111 0x00000000, 104 0x00000000,
112 0x00000000, 105 0x00000000,
113 0x00000000, 106 0x00000000,
114 0x454c4449,
115 0x000004f7,
116 0x000004f5,
117 0x00000000,
118 0x00000000,
119 0x00000000,
120 0x00000000,
121 0x00000000,
122 0x00000000,
123 0x00000000,
124 0x00000000, 107 0x00000000,
125 0x00000000, 108 0x00000000,
126 0x00000000, 109 0x00000000,
@@ -128,18 +111,9 @@ uint32_t nvd0_pwr_data[] = {
128 0x00000000, 111 0x00000000,
129 0x00000000, 112 0x00000000,
130 0x00000000, 113 0x00000000,
131 0x00000000, 114 0x54534554,
132 0x00000000, 115 0x00000906,
133 0x00000000, 116 0x000008e5,
134 0x00000000,
135 0x00000000,
136/* 0x0210: proc_list_tail */
137/* 0x0210: time_prev */
138 0x00000000,
139/* 0x0214: time_next */
140 0x00000000,
141/* 0x0218: fifo_queue */
142 0x00000000,
143 0x00000000, 117 0x00000000,
144 0x00000000, 118 0x00000000,
145 0x00000000, 119 0x00000000,
@@ -159,6 +133,9 @@ uint32_t nvd0_pwr_data[] = {
159 0x00000000, 133 0x00000000,
160 0x00000000, 134 0x00000000,
161 0x00000000, 135 0x00000000,
136 0x454c4449,
137 0x00000912,
138 0x00000910,
162 0x00000000, 139 0x00000000,
163 0x00000000, 140 0x00000000,
164 0x00000000, 141 0x00000000,
@@ -171,7 +148,6 @@ uint32_t nvd0_pwr_data[] = {
171 0x00000000, 148 0x00000000,
172 0x00000000, 149 0x00000000,
173 0x00000000, 150 0x00000000,
174/* 0x0298: rfifo_queue */
175 0x00000000, 151 0x00000000,
176 0x00000000, 152 0x00000000,
177 0x00000000, 153 0x00000000,
@@ -179,8 +155,12 @@ uint32_t nvd0_pwr_data[] = {
179 0x00000000, 155 0x00000000,
180 0x00000000, 156 0x00000000,
181 0x00000000, 157 0x00000000,
158/* 0x0268: proc_list_tail */
159/* 0x0268: time_prev */
182 0x00000000, 160 0x00000000,
161/* 0x026c: time_next */
183 0x00000000, 162 0x00000000,
163/* 0x0270: fifo_queue */
184 0x00000000, 164 0x00000000,
185 0x00000000, 165 0x00000000,
186 0x00000000, 166 0x00000000,
@@ -204,31 +184,16 @@ uint32_t nvd0_pwr_data[] = {
204 0x00000000, 184 0x00000000,
205 0x00000000, 185 0x00000000,
206 0x00000000, 186 0x00000000,
207/* 0x0318: memx_func_head */
208 0x00010000,
209 0x00000000, 187 0x00000000,
210 0x000003f4,
211/* 0x0324: memx_func_next */
212 0x00000001,
213 0x00000000,
214 0x00000415,
215 0x00000002,
216 0x00000002,
217 0x00000430,
218 0x00040003,
219 0x00000000, 188 0x00000000,
220 0x00000458,
221 0x00010004,
222 0x00000000, 189 0x00000000,
223 0x00000472,
224/* 0x0354: memx_func_tail */
225/* 0x0354: memx_data_head */
226 0x00000000, 190 0x00000000,
227 0x00000000, 191 0x00000000,
228 0x00000000, 192 0x00000000,
229 0x00000000, 193 0x00000000,
230 0x00000000, 194 0x00000000,
231 0x00000000, 195 0x00000000,
196/* 0x02f0: rfifo_queue */
232 0x00000000, 197 0x00000000,
233 0x00000000, 198 0x00000000,
234 0x00000000, 199 0x00000000,
@@ -261,10 +226,25 @@ uint32_t nvd0_pwr_data[] = {
261 0x00000000, 226 0x00000000,
262 0x00000000, 227 0x00000000,
263 0x00000000, 228 0x00000000,
229/* 0x0370: memx_func_head */
230 0x00010000,
264 0x00000000, 231 0x00000000,
232 0x000003f4,
233/* 0x037c: memx_func_next */
234 0x00000001,
265 0x00000000, 235 0x00000000,
236 0x00000415,
237 0x00000002,
238 0x00000002,
239 0x00000430,
240 0x00040003,
266 0x00000000, 241 0x00000000,
242 0x00000458,
243 0x00010004,
267 0x00000000, 244 0x00000000,
245 0x00000472,
246/* 0x03ac: memx_func_tail */
247/* 0x03ac: memx_data_head */
268 0x00000000, 248 0x00000000,
269 0x00000000, 249 0x00000000,
270 0x00000000, 250 0x00000000,
@@ -735,7 +715,6 @@ uint32_t nvd0_pwr_data[] = {
735 0x00000000, 715 0x00000000,
736 0x00000000, 716 0x00000000,
737 0x00000000, 717 0x00000000,
738/* 0x0b54: memx_data_tail */
739 0x00000000, 718 0x00000000,
740 0x00000000, 719 0x00000000,
741 0x00000000, 720 0x00000000,
@@ -778,6 +757,29 @@ uint32_t nvd0_pwr_data[] = {
778 0x00000000, 757 0x00000000,
779 0x00000000, 758 0x00000000,
780 0x00000000, 759 0x00000000,
760/* 0x0bac: memx_data_tail */
761/* 0x0bac: i2c_scl_map */
762 0x00000400,
763 0x00000800,
764 0x00001000,
765 0x00002000,
766 0x00004000,
767 0x00008000,
768 0x00010000,
769 0x00020000,
770 0x00040000,
771 0x00080000,
772/* 0x0bd4: i2c_sda_map */
773 0x00100000,
774 0x00200000,
775 0x00400000,
776 0x00800000,
777 0x01000000,
778 0x02000000,
779 0x04000000,
780 0x08000000,
781 0x10000000,
782 0x20000000,
781 0x00000000, 783 0x00000000,
782}; 784};
783 785
@@ -836,21 +838,21 @@ uint32_t nvd0_pwr_code[] = {
836 0x9800f8e2, 838 0x9800f8e2,
837 0x96b003e9, 839 0x96b003e9,
838 0x2a0bf400, 840 0x2a0bf400,
839 0xbb840a98, 841 0xbb9a0a98,
840 0x1cf4029a, 842 0x1cf4029a,
841 0x01d7f00f, 843 0x01d7f00f,
842 0x020621f5, 844 0x020621f5,
843 0x0ef494bd, 845 0x0ef494bd,
844/* 0x00c5: intr_watchdog_next_time */ 846/* 0x00c5: intr_watchdog_next_time */
845 0x850a9815, 847 0x9b0a9815,
846 0xf400a6b0, 848 0xf400a6b0,
847 0x9ab8090b, 849 0x9ab8090b,
848 0x061cf406, 850 0x061cf406,
849/* 0x00d4: intr_watchdog_next_time_set */ 851/* 0x00d4: intr_watchdog_next_time_set */
850/* 0x00d7: intr_watchdog_next_proc */ 852/* 0x00d7: intr_watchdog_next_proc */
851 0x80850980, 853 0x809b0980,
852 0xe0b603e9, 854 0xe0b603e9,
853 0x10e6b158, 855 0x68e6b158,
854 0xc61bf402, 856 0xc61bf402,
855/* 0x00e6: intr */ 857/* 0x00e6: intr */
856 0x00f900f8, 858 0x00f900f8,
@@ -868,15 +870,15 @@ uint32_t nvd0_pwr_code[] = {
868 0x0887f004, 870 0x0887f004,
869 0xc40088cf, 871 0xc40088cf,
870 0x0bf40289, 872 0x0bf40289,
871 0x85008020, 873 0x9b008020,
872 0xf458e7f0, 874 0xf458e7f0,
873 0x0998a721, 875 0x0998a721,
874 0x0096b085, 876 0x0096b09b,
875 0xf00e0bf4, 877 0xf00e0bf4,
876 0x09d03407, 878 0x09d03407,
877 0x8004bd00, 879 0x8004bd00,
878/* 0x013e: intr_skip_watchdog */ 880/* 0x013e: intr_skip_watchdog */
879 0x89e48409, 881 0x89e49a09,
880 0x0bf40800, 882 0x0bf40800,
881 0x8897f13c, 883 0x8897f13c,
882 0x0099cf06, 884 0x0099cf06,
@@ -929,7 +931,7 @@ uint32_t nvd0_pwr_code[] = {
929 0x0ed03407, 931 0x0ed03407,
930 0x8004bd00, 932 0x8004bd00,
931/* 0x01f6: timer_enable */ 933/* 0x01f6: timer_enable */
932 0x87f0840e, 934 0x87f09a0e,
933 0x3807f001, 935 0x3807f001,
934 0xbd0008d0, 936 0xbd0008d0,
935/* 0x0201: timer_done */ 937/* 0x0201: timer_done */
@@ -960,7 +962,7 @@ uint32_t nvd0_pwr_code[] = {
960 0x06aeb800, 962 0x06aeb800,
961 0xb6100bf4, 963 0xb6100bf4,
962 0x86b15880, 964 0x86b15880,
963 0x1bf40210, 965 0x1bf40268,
964 0x0132f4f0, 966 0x0132f4f0,
965/* 0x0264: find_done */ 967/* 0x0264: find_done */
966 0xfc028eb9, 968 0xfc028eb9,
@@ -1024,7 +1026,7 @@ uint32_t nvd0_pwr_code[] = {
1024 0x0bf40612, 1026 0x0bf40612,
1025 0x071ec42f, 1027 0x071ec42f,
1026 0xb704ee94, 1028 0xb704ee94,
1027 0x980218e0, 1029 0x980270e0,
1028 0xec9803eb, 1030 0xec9803eb,
1029 0x01ed9802, 1031 0x01ed9802,
1030 0xf500ee98, 1032 0xf500ee98,
@@ -1048,7 +1050,7 @@ uint32_t nvd0_pwr_code[] = {
1048 0xec0bf406, 1050 0xec0bf406,
1049 0xb60723c4, 1051 0xb60723c4,
1050 0x30b70434, 1052 0x30b70434,
1051 0x3b800298, 1053 0x3b8002f0,
1052 0x023c8003, 1054 0x023c8003,
1053 0x80013d80, 1055 0x80013d80,
1054 0x20b6003e, 1056 0x20b6003e,
@@ -1061,12 +1063,12 @@ uint32_t nvd0_pwr_code[] = {
1061/* 0x03be: host_init */ 1063/* 0x03be: host_init */
1062 0x17f100f8, 1064 0x17f100f8,
1063 0x14b60080, 1065 0x14b60080,
1064 0x1815f110, 1066 0x7015f110,
1065 0xd007f102, 1067 0xd007f102,
1066 0x0001d004, 1068 0x0001d004,
1067 0x17f104bd, 1069 0x17f104bd,
1068 0x14b60080, 1070 0x14b60080,
1069 0x9815f110, 1071 0xf015f110,
1070 0xdc07f102, 1072 0xdc07f102,
1071 0x0001d004, 1073 0x0001d004,
1072 0x17f004bd, 1074 0x17f004bd,
@@ -1122,13 +1124,13 @@ uint32_t nvd0_pwr_code[] = {
1122 0x10b60013, 1124 0x10b60013,
1123 0x10349504, 1125 0x10349504,
1124 0x980c30f0, 1126 0x980c30f0,
1125 0x55f9c835, 1127 0x55f9de35,
1126 0xf40612b8, 1128 0xf40612b8,
1127 0xd0fcec1e, 1129 0xd0fcec1e,
1128 0x21f5e0fc, 1130 0x21f5e0fc,
1129 0x00f8026b, 1131 0x00f8026b,
1130/* 0x04a8: memx_info */ 1132/* 0x04a8: memx_info */
1131 0x0354c7f1, 1133 0x03acc7f1,
1132 0x0800b7f1, 1134 0x0800b7f1,
1133 0x026b21f5, 1135 0x026b21f5,
1134/* 0x04b6: memx_recv */ 1136/* 0x04b6: memx_recv */
@@ -1140,49 +1142,342 @@ uint32_t nvd0_pwr_code[] = {
1140/* 0x04c6: perf_recv */ 1142/* 0x04c6: perf_recv */
1141 0x00f800f8, 1143 0x00f800f8,
1142/* 0x04c8: perf_init */ 1144/* 0x04c8: perf_init */
1143/* 0x04ca: test_recv */ 1145/* 0x04ca: i2c_drive_scl */
1144 0x17f100f8, 1146 0x36b000f8,
1145 0x11cf05d8, 1147 0x0e0bf400,
1146 0x0110b600, 1148 0x07e007f1,
1147 0x05d807f1,
1148 0xbd0001d0, 1149 0xbd0001d0,
1149 0x00e7f104, 1150/* 0x04db: i2c_drive_scl_lo */
1150 0x4fe3f1d9, 1151 0xf100f804,
1151 0xb621f513, 1152 0xd007e407,
1152/* 0x04eb: test_init */ 1153 0x04bd0001,
1153 0xf100f801, 1154/* 0x04e6: i2c_drive_sda */
1154 0xf50800e7, 1155 0x36b000f8,
1155 0xf801b621, 1156 0x0e0bf400,
1156/* 0x04f5: idle_recv */ 1157 0x07e007f1,
1157/* 0x04f7: idle */ 1158 0xbd0002d0,
1158 0xf400f800, 1159/* 0x04f7: i2c_drive_sda_lo */
1159 0x17f10031, 1160 0xf100f804,
1160 0x11cf05d4, 1161 0xd007e407,
1161 0x0110b600, 1162 0x04bd0002,
1162 0x05d407f1, 1163/* 0x0502: i2c_sense_scl */
1163 0xbd0001d0, 1164 0x32f400f8,
1164/* 0x050d: idle_loop */ 1165 0xc437f101,
1165 0x5817f004, 1166 0x0033cf07,
1166/* 0x0513: idle_proc */ 1167 0xf40431fd,
1167/* 0x0513: idle_proc_exec */ 1168 0x31f4060b,
1168 0xf90232f4, 1169/* 0x0515: i2c_sense_scl_done */
1169 0x021eb910, 1170/* 0x0517: i2c_sense_sda */
1170 0x027421f5, 1171 0xf400f801,
1171 0x11f410fc, 1172 0x37f10132,
1172 0x0231f409, 1173 0x33cf07c4,
1173/* 0x0527: idle_proc_next */ 1174 0x0432fd00,
1174 0xb6ef0ef4, 1175 0xf4060bf4,
1175 0x1fb85810, 1176/* 0x052a: i2c_sense_sda_done */
1176 0xe61bf406, 1177 0x00f80131,
1177 0xf4dd02f4, 1178/* 0x052c: i2c_raise_scl */
1178 0x0ef40028, 1179 0x47f140f9,
1179 0x000000c1, 1180 0x37f00898,
1180 0x00000000, 1181 0xca21f501,
1181 0x00000000, 1182/* 0x0539: i2c_raise_scl_wait */
1182 0x00000000, 1183 0xe8e7f104,
1183 0x00000000, 1184 0x6721f403,
1184 0x00000000, 1185 0x050221f5,
1185 0x00000000, 1186 0xb60901f4,
1187 0x1bf40142,
1188/* 0x054d: i2c_raise_scl_done */
1189 0xf840fcef,
1190/* 0x0551: i2c_start */
1191 0x0221f500,
1192 0x0d11f405,
1193 0x051721f5,
1194 0xf40611f4,
1195/* 0x0562: i2c_start_rep */
1196 0x37f0300e,
1197 0xca21f500,
1198 0x0137f004,
1199 0x04e621f5,
1200 0xb60076bb,
1201 0x50f90465,
1202 0xbb046594,
1203 0x50bd0256,
1204 0xfc0475fd,
1205 0x2c21f550,
1206 0x0464b605,
1207/* 0x058f: i2c_start_send */
1208 0xf01f11f4,
1209 0x21f50037,
1210 0xe7f104e6,
1211 0x21f41388,
1212 0x0037f067,
1213 0x04ca21f5,
1214 0x1388e7f1,
1215/* 0x05ab: i2c_start_out */
1216 0xf86721f4,
1217/* 0x05ad: i2c_stop */
1218 0x0037f000,
1219 0x04ca21f5,
1220 0xf50037f0,
1221 0xf104e621,
1222 0xf403e8e7,
1223 0x37f06721,
1224 0xca21f501,
1225 0x88e7f104,
1226 0x6721f413,
1227 0xf50137f0,
1228 0xf104e621,
1229 0xf41388e7,
1230 0x00f86721,
1231/* 0x05e0: i2c_bitw */
1232 0x04e621f5,
1233 0x03e8e7f1,
1234 0xbb6721f4,
1235 0x65b60076,
1236 0x9450f904,
1237 0x56bb0465,
1238 0xfd50bd02,
1239 0x50fc0475,
1240 0x052c21f5,
1241 0xf40464b6,
1242 0xe7f11811,
1243 0x21f41388,
1244 0x0037f067,
1245 0x04ca21f5,
1246 0x1388e7f1,
1247/* 0x061f: i2c_bitw_out */
1248 0xf86721f4,
1249/* 0x0621: i2c_bitr */
1250 0x0137f000,
1251 0x04e621f5,
1252 0x03e8e7f1,
1253 0xbb6721f4,
1254 0x65b60076,
1255 0x9450f904,
1256 0x56bb0465,
1257 0xfd50bd02,
1258 0x50fc0475,
1259 0x052c21f5,
1260 0xf40464b6,
1261 0x21f51b11,
1262 0x37f00517,
1263 0xca21f500,
1264 0x88e7f104,
1265 0x6721f413,
1266 0xf4013cf0,
1267/* 0x0666: i2c_bitr_done */
1268 0x00f80131,
1269/* 0x0668: i2c_get_byte */
1270 0xf00057f0,
1271/* 0x066e: i2c_get_byte_next */
1272 0x54b60847,
1273 0x0076bb01,
1274 0xf90465b6,
1275 0x04659450,
1276 0xbd0256bb,
1277 0x0475fd50,
1278 0x21f550fc,
1279 0x64b60621,
1280 0x2b11f404,
1281 0xb60553fd,
1282 0x1bf40142,
1283 0x0137f0d8,
1284 0xb60076bb,
1285 0x50f90465,
1286 0xbb046594,
1287 0x50bd0256,
1288 0xfc0475fd,
1289 0xe021f550,
1290 0x0464b605,
1291/* 0x06b8: i2c_get_byte_done */
1292/* 0x06ba: i2c_put_byte */
1293 0x47f000f8,
1294/* 0x06bd: i2c_put_byte_next */
1295 0x0142b608,
1296 0xbb3854ff,
1297 0x65b60076,
1298 0x9450f904,
1299 0x56bb0465,
1300 0xfd50bd02,
1301 0x50fc0475,
1302 0x05e021f5,
1303 0xf40464b6,
1304 0x46b03411,
1305 0xd81bf400,
1306 0xb60076bb,
1307 0x50f90465,
1308 0xbb046594,
1309 0x50bd0256,
1310 0xfc0475fd,
1311 0x2121f550,
1312 0x0464b606,
1313 0xbb0f11f4,
1314 0x36b00076,
1315 0x061bf401,
1316/* 0x0713: i2c_put_byte_done */
1317 0xf80132f4,
1318/* 0x0715: i2c_addr */
1319 0x0076bb00,
1320 0xf90465b6,
1321 0x04659450,
1322 0xbd0256bb,
1323 0x0475fd50,
1324 0x21f550fc,
1325 0x64b60551,
1326 0x2911f404,
1327 0x012ec3e7,
1328 0xfd0134b6,
1329 0x76bb0553,
1330 0x0465b600,
1331 0x659450f9,
1332 0x0256bb04,
1333 0x75fd50bd,
1334 0xf550fc04,
1335 0xb606ba21,
1336/* 0x075a: i2c_addr_done */
1337 0x00f80464,
1338/* 0x075c: i2c_acquire_addr */
1339 0xb6f8cec7,
1340 0xe0b705e4,
1341 0x00f8d014,
1342/* 0x0768: i2c_acquire */
1343 0x075c21f5,
1344 0xf00421f4,
1345 0x21f403d9,
1346/* 0x0777: i2c_release */
1347 0xf500f833,
1348 0xf4075c21,
1349 0xdaf00421,
1350 0x3321f403,
1351/* 0x0786: i2c_recv */
1352 0x32f400f8,
1353 0xf8c1c701,
1354 0xb00214b6,
1355 0x1ff52816,
1356 0x13a0013a,
1357 0x32980bd4,
1358 0xac13a000,
1359 0x0031980b,
1360 0xf90231f4,
1361 0xf9e0f9d0,
1362 0x0067f1d0,
1363 0x0063f100,
1364 0x01679210,
1365 0xb60076bb,
1366 0x50f90465,
1367 0xbb046594,
1368 0x50bd0256,
1369 0xfc0475fd,
1370 0x6821f550,
1371 0x0464b607,
1372 0xd6b0d0fc,
1373 0xb31bf500,
1374 0x0057f000,
1375 0xb60076bb,
1376 0x50f90465,
1377 0xbb046594,
1378 0x50bd0256,
1379 0xfc0475fd,
1380 0x1521f550,
1381 0x0464b607,
1382 0x00d011f5,
1383 0xbbe0c5c7,
1384 0x65b60076,
1385 0x9450f904,
1386 0x56bb0465,
1387 0xfd50bd02,
1388 0x50fc0475,
1389 0x06ba21f5,
1390 0xf50464b6,
1391 0xf000ad11,
1392 0x76bb0157,
1393 0x0465b600,
1394 0x659450f9,
1395 0x0256bb04,
1396 0x75fd50bd,
1397 0xf550fc04,
1398 0xb6071521,
1399 0x11f50464,
1400 0x76bb008a,
1401 0x0465b600,
1402 0x659450f9,
1403 0x0256bb04,
1404 0x75fd50bd,
1405 0xf550fc04,
1406 0xb6066821,
1407 0x11f40464,
1408 0xe05bcb6a,
1409 0xb60076bb,
1410 0x50f90465,
1411 0xbb046594,
1412 0x50bd0256,
1413 0xfc0475fd,
1414 0xad21f550,
1415 0x0464b605,
1416 0xbd025bb9,
1417 0x430ef474,
1418/* 0x088c: i2c_recv_not_rd08 */
1419 0xf401d6b0,
1420 0x57f03d1b,
1421 0x1521f500,
1422 0x3311f407,
1423 0xf5e0c5c7,
1424 0xf406ba21,
1425 0x57f02911,
1426 0x1521f500,
1427 0x1f11f407,
1428 0xf5e0b5c7,
1429 0xf406ba21,
1430 0x21f51511,
1431 0x74bd05ad,
1432 0xf408c5c7,
1433 0x32f4091b,
1434 0x030ef402,
1435/* 0x08cc: i2c_recv_not_wr08 */
1436/* 0x08cc: i2c_recv_done */
1437 0xf5f8cec7,
1438 0xfc077721,
1439 0xf4d0fce0,
1440 0x7cb90a12,
1441 0x6b21f502,
1442/* 0x08e1: i2c_recv_exit */
1443/* 0x08e3: i2c_init */
1444 0xf800f802,
1445/* 0x08e5: test_recv */
1446 0xd817f100,
1447 0x0011cf05,
1448 0xf10110b6,
1449 0xd005d807,
1450 0x04bd0001,
1451 0xd900e7f1,
1452 0x134fe3f1,
1453 0x01b621f5,
1454/* 0x0906: test_init */
1455 0xe7f100f8,
1456 0x21f50800,
1457 0x00f801b6,
1458/* 0x0910: idle_recv */
1459/* 0x0912: idle */
1460 0x31f400f8,
1461 0xd417f100,
1462 0x0011cf05,
1463 0xf10110b6,
1464 0xd005d407,
1465 0x04bd0001,
1466/* 0x0928: idle_loop */
1467 0xf45817f0,
1468/* 0x092e: idle_proc */
1469/* 0x092e: idle_proc_exec */
1470 0x10f90232,
1471 0xf5021eb9,
1472 0xfc027421,
1473 0x0911f410,
1474 0xf40231f4,
1475/* 0x0942: idle_proc_next */
1476 0x10b6ef0e,
1477 0x061fb858,
1478 0xf4e61bf4,
1479 0x28f4dd02,
1480 0xc10ef400,
1186 0x00000000, 1481 0x00000000,
1187 0x00000000, 1482 0x00000000,
1188 0x00000000, 1483 0x00000000,
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/os.h b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/os.h
index 5fb0cccc6c64..574acfa44c8c 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/os.h
+++ b/drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/os.h
@@ -7,6 +7,7 @@
7#define PROC_HOST 0x54534f48 7#define PROC_HOST 0x54534f48
8#define PROC_MEMX 0x584d454d 8#define PROC_MEMX 0x584d454d
9#define PROC_PERF 0x46524550 9#define PROC_PERF 0x46524550
10#define PROC_I2C_ 0x5f433249
10#define PROC_TEST 0x54534554 11#define PROC_TEST 0x54534554
11 12
12/* KERN: message identifiers */ 13/* KERN: message identifiers */
@@ -24,4 +25,22 @@
24#define MEMX_WAIT 3 25#define MEMX_WAIT 3
25#define MEMX_DELAY 4 26#define MEMX_DELAY 4
26 27
28/* I2C_: message identifiers */
29#define I2C__MSG_RD08 0
30#define I2C__MSG_WR08 1
31
32#define I2C__MSG_DATA0_PORT 24:31
33#define I2C__MSG_DATA0_ADDR 14:23
34
35#define I2C__MSG_DATA0_RD08_PORT I2C__MSG_DATA0_PORT
36#define I2C__MSG_DATA0_RD08_ADDR I2C__MSG_DATA0_ADDR
37#define I2C__MSG_DATA0_RD08_REG 0:7
38#define I2C__MSG_DATA1_RD08_VAL 0:7
39
40#define I2C__MSG_DATA0_WR08_PORT I2C__MSG_DATA0_PORT
41#define I2C__MSG_DATA0_WR08_ADDR I2C__MSG_DATA0_ADDR
42#define I2C__MSG_DATA0_WR08_SYNC 8:8
43#define I2C__MSG_DATA0_WR08_REG 0:7
44#define I2C__MSG_DATA1_WR08_VAL 0:7
45
27#endif 46#endif