aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-01-14 00:13:36 -0500
committerBen Skeggs <bskeggs@redhat.com>2015-01-21 21:17:59 -0500
commitde3aaa6651ed7075e293c4e48c482012e8e8c87d (patch)
tree38db294d39ad40efcb51364e65704a093896a482
parent9e79a85343e2191ac83f0ef4fe49b71b9d80ad38 (diff)
drm/nouveau/volt: namespace + nvidia gpu names (no binary change)
The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h69
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c65
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c36
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c16
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/nv40.c21
6 files changed, 100 insertions, 108 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h
index 13e9a83ceccc..e3d7243fbb1d 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h
@@ -1,22 +1,20 @@
1#ifndef __NOUVEAU_VOLT_H__ 1#ifndef __NVKM_VOLT_H__
2#define __NOUVEAU_VOLT_H__ 2#define __NVKM_VOLT_H__
3
4#include <core/subdev.h> 3#include <core/subdev.h>
5#include <core/device.h>
6 4
7struct nouveau_voltage { 5struct nvkm_voltage {
8 u32 uv; 6 u32 uv;
9 u8 id; 7 u8 id;
10}; 8};
11 9
12struct nouveau_volt { 10struct nvkm_volt {
13 struct nouveau_subdev base; 11 struct nvkm_subdev base;
14 12
15 int (*vid_get)(struct nouveau_volt *); 13 int (*vid_get)(struct nvkm_volt *);
16 int (*get)(struct nouveau_volt *); 14 int (*get)(struct nvkm_volt *);
17 int (*vid_set)(struct nouveau_volt *, u8 vid); 15 int (*vid_set)(struct nvkm_volt *, u8 vid);
18 int (*set)(struct nouveau_volt *, u32 uv); 16 int (*set)(struct nvkm_volt *, u32 uv);
19 int (*set_id)(struct nouveau_volt *, u8 id, int condition); 17 int (*set_id)(struct nvkm_volt *, u8 id, int condition);
20 18
21 u8 vid_mask; 19 u8 vid_mask;
22 u8 vid_nr; 20 u8 vid_nr;
@@ -26,36 +24,35 @@ struct nouveau_volt {
26 } vid[256]; 24 } vid[256];
27}; 25};
28 26
29static inline struct nouveau_volt * 27static inline struct nvkm_volt *
30nouveau_volt(void *obj) 28nvkm_volt(void *obj)
31{ 29{
32 return (void *)nouveau_subdev(obj, NVDEV_SUBDEV_VOLT); 30 return (void *)nvkm_subdev(obj, NVDEV_SUBDEV_VOLT);
33} 31}
34 32
35#define nouveau_volt_create(p, e, o, d) \ 33#define nvkm_volt_create(p, e, o, d) \
36 nouveau_volt_create_((p), (e), (o), sizeof(**d), (void **)d) 34 nvkm_volt_create_((p), (e), (o), sizeof(**d), (void **)d)
37#define nouveau_volt_destroy(p) ({ \ 35#define nvkm_volt_destroy(p) ({ \
38 struct nouveau_volt *v = (p); \ 36 struct nvkm_volt *v = (p); \
39 _nouveau_volt_dtor(nv_object(v)); \ 37 _nvkm_volt_dtor(nv_object(v)); \
40}) 38})
41#define nouveau_volt_init(p) ({ \ 39#define nvkm_volt_init(p) ({ \
42 struct nouveau_volt *v = (p); \ 40 struct nvkm_volt *v = (p); \
43 _nouveau_volt_init(nv_object(v)); \ 41 _nvkm_volt_init(nv_object(v)); \
44}) 42})
45#define nouveau_volt_fini(p,s) \ 43#define nvkm_volt_fini(p,s) \
46 nouveau_subdev_fini((p), (s)) 44 nvkm_subdev_fini((p), (s))
47
48int nouveau_volt_create_(struct nouveau_object *, struct nouveau_object *,
49 struct nouveau_oclass *, int, void **);
50void _nouveau_volt_dtor(struct nouveau_object *);
51int _nouveau_volt_init(struct nouveau_object *);
52#define _nouveau_volt_fini _nouveau_subdev_fini
53 45
54extern struct nouveau_oclass nv40_volt_oclass; 46int nvkm_volt_create_(struct nvkm_object *, struct nvkm_object *,
55extern struct nouveau_oclass gk20a_volt_oclass; 47 struct nvkm_oclass *, int, void **);
48void _nvkm_volt_dtor(struct nvkm_object *);
49int _nvkm_volt_init(struct nvkm_object *);
50#define _nvkm_volt_fini _nvkm_subdev_fini
56 51
57int nouveau_voltgpio_init(struct nouveau_volt *); 52extern struct nvkm_oclass nv40_volt_oclass;
58int nouveau_voltgpio_get(struct nouveau_volt *); 53extern struct nvkm_oclass gk20a_volt_oclass;
59int nouveau_voltgpio_set(struct nouveau_volt *, u8);
60 54
55int nvkm_voltgpio_init(struct nvkm_volt *);
56int nvkm_voltgpio_get(struct nvkm_volt *);
57int nvkm_voltgpio_set(struct nvkm_volt *, u8);
61#endif 58#endif
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
index adfd3d93e066..b24a9cc04b73 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
@@ -30,6 +30,7 @@
30#include <subdev/therm.h> 30#include <subdev/therm.h>
31#include <subdev/volt.h> 31#include <subdev/volt.h>
32 32
33#include <core/device.h>
33#include <core/option.h> 34#include <core/option.h>
34 35
35/****************************************************************************** 36/******************************************************************************
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
index 26ccd8df193f..39f15803f2d4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
@@ -21,15 +21,13 @@
21 * 21 *
22 * Authors: Ben Skeggs 22 * Authors: Ben Skeggs
23 */ 23 */
24
25#include <subdev/volt.h> 24#include <subdev/volt.h>
26
27#include <subdev/bios.h> 25#include <subdev/bios.h>
28#include <subdev/bios/vmap.h> 26#include <subdev/bios/vmap.h>
29#include <subdev/bios/volt.h> 27#include <subdev/bios/volt.h>
30 28
31static int 29static int
32nouveau_volt_get(struct nouveau_volt *volt) 30nvkm_volt_get(struct nvkm_volt *volt)
33{ 31{
34 if (volt->vid_get) { 32 if (volt->vid_get) {
35 int ret = volt->vid_get(volt), i; 33 int ret = volt->vid_get(volt), i;
@@ -46,7 +44,7 @@ nouveau_volt_get(struct nouveau_volt *volt)
46} 44}
47 45
48static int 46static int
49nouveau_volt_set(struct nouveau_volt *volt, u32 uv) 47nvkm_volt_set(struct nvkm_volt *volt, u32 uv)
50{ 48{
51 if (volt->vid_set) { 49 if (volt->vid_set) {
52 int i, ret = -EINVAL; 50 int i, ret = -EINVAL;
@@ -63,9 +61,9 @@ nouveau_volt_set(struct nouveau_volt *volt, u32 uv)
63} 61}
64 62
65static int 63static int
66nouveau_volt_map(struct nouveau_volt *volt, u8 id) 64nvkm_volt_map(struct nvkm_volt *volt, u8 id)
67{ 65{
68 struct nouveau_bios *bios = nouveau_bios(volt); 66 struct nvkm_bios *bios = nvkm_bios(volt);
69 struct nvbios_vmap_entry info; 67 struct nvbios_vmap_entry info;
70 u8 ver, len; 68 u8 ver, len;
71 u16 vmap; 69 u16 vmap;
@@ -73,7 +71,7 @@ nouveau_volt_map(struct nouveau_volt *volt, u8 id)
73 vmap = nvbios_vmap_entry_parse(bios, id, &ver, &len, &info); 71 vmap = nvbios_vmap_entry_parse(bios, id, &ver, &len, &info);
74 if (vmap) { 72 if (vmap) {
75 if (info.link != 0xff) { 73 if (info.link != 0xff) {
76 int ret = nouveau_volt_map(volt, info.link); 74 int ret = nvkm_volt_map(volt, info.link);
77 if (ret < 0) 75 if (ret < 0)
78 return ret; 76 return ret;
79 info.min += ret; 77 info.min += ret;
@@ -85,15 +83,15 @@ nouveau_volt_map(struct nouveau_volt *volt, u8 id)
85} 83}
86 84
87static int 85static int
88nouveau_volt_set_id(struct nouveau_volt *volt, u8 id, int condition) 86nvkm_volt_set_id(struct nvkm_volt *volt, u8 id, int condition)
89{ 87{
90 int ret = nouveau_volt_map(volt, id); 88 int ret = nvkm_volt_map(volt, id);
91 if (ret >= 0) { 89 if (ret >= 0) {
92 int prev = nouveau_volt_get(volt); 90 int prev = nvkm_volt_get(volt);
93 if (!condition || prev < 0 || 91 if (!condition || prev < 0 ||
94 (condition < 0 && ret < prev) || 92 (condition < 0 && ret < prev) ||
95 (condition > 0 && ret > prev)) { 93 (condition > 0 && ret > prev)) {
96 ret = nouveau_volt_set(volt, ret); 94 ret = nvkm_volt_set(volt, ret);
97 } else { 95 } else {
98 ret = 0; 96 ret = 0;
99 } 97 }
@@ -101,8 +99,8 @@ nouveau_volt_set_id(struct nouveau_volt *volt, u8 id, int condition)
101 return ret; 99 return ret;
102} 100}
103 101
104static void nouveau_volt_parse_bios(struct nouveau_bios *bios, 102static void
105 struct nouveau_volt *volt) 103nvkm_volt_parse_bios(struct nvkm_bios *bios, struct nvkm_volt *volt)
106{ 104{
107 struct nvbios_volt_entry ivid; 105 struct nvbios_volt_entry ivid;
108 struct nvbios_volt info; 106 struct nvbios_volt info;
@@ -125,7 +123,7 @@ static void nouveau_volt_parse_bios(struct nouveau_bios *bios,
125 } else if (data && info.vidmask) { 123 } else if (data && info.vidmask) {
126 for (i = 0; i < cnt; i++) { 124 for (i = 0; i < cnt; i++) {
127 data = nvbios_volt_entry_parse(bios, i, &ver, &hdr, 125 data = nvbios_volt_entry_parse(bios, i, &ver, &hdr,
128 &ivid); 126 &ivid);
129 if (data) { 127 if (data) {
130 volt->vid[volt->vid_nr].uv = ivid.voltage; 128 volt->vid[volt->vid_nr].uv = ivid.voltage;
131 volt->vid[volt->vid_nr].vid = ivid.vid; 129 volt->vid[volt->vid_nr].vid = ivid.vid;
@@ -137,12 +135,12 @@ static void nouveau_volt_parse_bios(struct nouveau_bios *bios,
137} 135}
138 136
139int 137int
140_nouveau_volt_init(struct nouveau_object *object) 138_nvkm_volt_init(struct nvkm_object *object)
141{ 139{
142 struct nouveau_volt *volt = (void *)object; 140 struct nvkm_volt *volt = (void *)object;
143 int ret; 141 int ret;
144 142
145 ret = nouveau_subdev_init(&volt->base); 143 ret = nvkm_subdev_init(&volt->base);
146 if (ret) 144 if (ret)
147 return ret; 145 return ret;
148 146
@@ -158,34 +156,33 @@ _nouveau_volt_init(struct nouveau_object *object)
158} 156}
159 157
160void 158void
161_nouveau_volt_dtor(struct nouveau_object *object) 159_nvkm_volt_dtor(struct nvkm_object *object)
162{ 160{
163 struct nouveau_volt *volt = (void *)object; 161 struct nvkm_volt *volt = (void *)object;
164 nouveau_subdev_destroy(&volt->base); 162 nvkm_subdev_destroy(&volt->base);
165} 163}
166 164
167int 165int
168nouveau_volt_create_(struct nouveau_object *parent, 166nvkm_volt_create_(struct nvkm_object *parent, struct nvkm_object *engine,
169 struct nouveau_object *engine, 167 struct nvkm_oclass *oclass, int length, void **pobject)
170 struct nouveau_oclass *oclass, int length, void **pobject)
171{ 168{
172 struct nouveau_bios *bios = nouveau_bios(parent); 169 struct nvkm_bios *bios = nvkm_bios(parent);
173 struct nouveau_volt *volt; 170 struct nvkm_volt *volt;
174 int ret, i; 171 int ret, i;
175 172
176 ret = nouveau_subdev_create_(parent, engine, oclass, 0, "VOLT", 173 ret = nvkm_subdev_create_(parent, engine, oclass, 0, "VOLT",
177 "voltage", length, pobject); 174 "voltage", length, pobject);
178 volt = *pobject; 175 volt = *pobject;
179 if (ret) 176 if (ret)
180 return ret; 177 return ret;
181 178
182 volt->get = nouveau_volt_get; 179 volt->get = nvkm_volt_get;
183 volt->set = nouveau_volt_set; 180 volt->set = nvkm_volt_set;
184 volt->set_id = nouveau_volt_set_id; 181 volt->set_id = nvkm_volt_set_id;
185 182
186 /* Assuming the non-bios device should build the voltage table later */ 183 /* Assuming the non-bios device should build the voltage table later */
187 if (bios) 184 if (bios)
188 nouveau_volt_parse_bios(bios, volt); 185 nvkm_volt_parse_bios(bios, volt);
189 186
190 if (volt->vid_nr) { 187 if (volt->vid_nr) {
191 for (i = 0; i < volt->vid_nr; i++) { 188 for (i = 0; i < volt->vid_nr; i++) {
@@ -196,10 +193,10 @@ nouveau_volt_create_(struct nouveau_object *parent,
196 /*XXX: this is an assumption.. there probably exists boards 193 /*XXX: this is an assumption.. there probably exists boards
197 * out there with i2c-connected voltage controllers too.. 194 * out there with i2c-connected voltage controllers too..
198 */ 195 */
199 ret = nouveau_voltgpio_init(volt); 196 ret = nvkm_voltgpio_init(volt);
200 if (ret == 0) { 197 if (ret == 0) {
201 volt->vid_get = nouveau_voltgpio_get; 198 volt->vid_get = nvkm_voltgpio_get;
202 volt->vid_set = nouveau_voltgpio_set; 199 volt->vid_set = nvkm_voltgpio_set;
203 } 200 }
204 } 201 }
205 202
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
index 717368ef31ac..871fd51011db 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
@@ -19,11 +19,10 @@
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE. 20 * DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22#include <subdev/volt.h>
23#ifdef __KERNEL__ 23#ifdef __KERNEL__
24#include <nouveau_platform.h> 24#include <nouveau_platform.h>
25#endif 25#endif
26#include <subdev/volt.h>
27 26
28struct cvb_coef { 27struct cvb_coef {
29 int c0; 28 int c0;
@@ -35,7 +34,7 @@ struct cvb_coef {
35}; 34};
36 35
37struct gk20a_volt_priv { 36struct gk20a_volt_priv {
38 struct nouveau_volt base; 37 struct nvkm_volt base;
39 struct regulator *vdd; 38 struct regulator *vdd;
40}; 39};
41 40
@@ -62,8 +61,7 @@ const struct cvb_coef gk20a_cvb_coef[] = {
62 * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) 61 * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0)
63 */ 62 */
64static inline int 63static inline int
65gk20a_volt_get_cvb_voltage(int speedo, int s_scale, 64gk20a_volt_get_cvb_voltage(int speedo, int s_scale, const struct cvb_coef *coef)
66 const struct cvb_coef *coef)
67{ 65{
68 int mv; 66 int mv;
69 67
@@ -79,7 +77,7 @@ gk20a_volt_get_cvb_voltage(int speedo, int s_scale,
79 */ 77 */
80static inline int 78static inline int
81gk20a_volt_get_cvb_t_voltage(int speedo, int temp, int s_scale, int t_scale, 79gk20a_volt_get_cvb_t_voltage(int speedo, int temp, int s_scale, int t_scale,
82 const struct cvb_coef *coef) 80 const struct cvb_coef *coef)
83{ 81{
84 int cvb_mv, mv; 82 int cvb_mv, mv;
85 83
@@ -103,7 +101,7 @@ gk20a_volt_calc_voltage(const struct cvb_coef *coef, int speedo)
103} 101}
104 102
105static int 103static int
106gk20a_volt_vid_get(struct nouveau_volt *volt) 104gk20a_volt_vid_get(struct nvkm_volt *volt)
107{ 105{
108 struct gk20a_volt_priv *priv = (void *)volt; 106 struct gk20a_volt_priv *priv = (void *)volt;
109 int i, uv; 107 int i, uv;
@@ -118,7 +116,7 @@ gk20a_volt_vid_get(struct nouveau_volt *volt)
118} 116}
119 117
120static int 118static int
121gk20a_volt_vid_set(struct nouveau_volt *volt, u8 vid) 119gk20a_volt_vid_set(struct nvkm_volt *volt, u8 vid)
122{ 120{
123 struct gk20a_volt_priv *priv = (void *)volt; 121 struct gk20a_volt_priv *priv = (void *)volt;
124 122
@@ -127,7 +125,7 @@ gk20a_volt_vid_set(struct nouveau_volt *volt, u8 vid)
127} 125}
128 126
129static int 127static int
130gk20a_volt_set_id(struct nouveau_volt *volt, u8 id, int condition) 128gk20a_volt_set_id(struct nvkm_volt *volt, u8 id, int condition)
131{ 129{
132 struct gk20a_volt_priv *priv = (void *)volt; 130 struct gk20a_volt_priv *priv = (void *)volt;
133 int prev_uv = regulator_get_voltage(priv->vdd); 131 int prev_uv = regulator_get_voltage(priv->vdd);
@@ -148,16 +146,16 @@ gk20a_volt_set_id(struct nouveau_volt *volt, u8 id, int condition)
148} 146}
149 147
150static int 148static int
151gk20a_volt_ctor(struct nouveau_object *parent, struct nouveau_object *engine, 149gk20a_volt_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
152 struct nouveau_oclass *oclass, void *data, u32 size, 150 struct nvkm_oclass *oclass, void *data, u32 size,
153 struct nouveau_object **pobject) 151 struct nvkm_object **pobject)
154{ 152{
155 struct gk20a_volt_priv *priv; 153 struct gk20a_volt_priv *priv;
156 struct nouveau_volt *volt; 154 struct nvkm_volt *volt;
157 struct nouveau_platform_device *plat; 155 struct nouveau_platform_device *plat;
158 int i, ret, uv; 156 int i, ret, uv;
159 157
160 ret = nouveau_volt_create(parent, engine, oclass, &priv); 158 ret = nvkm_volt_create(parent, engine, oclass, &priv);
161 *pobject = nv_object(priv); 159 *pobject = nv_object(priv);
162 if (ret) 160 if (ret)
163 return ret; 161 return ret;
@@ -187,13 +185,13 @@ gk20a_volt_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
187 return 0; 185 return 0;
188} 186}
189 187
190struct nouveau_oclass 188struct nvkm_oclass
191gk20a_volt_oclass = { 189gk20a_volt_oclass = {
192 .handle = NV_SUBDEV(VOLT, 0xea), 190 .handle = NV_SUBDEV(VOLT, 0xea),
193 .ofuncs = &(struct nouveau_ofuncs) { 191 .ofuncs = &(struct nvkm_ofuncs) {
194 .ctor = gk20a_volt_ctor, 192 .ctor = gk20a_volt_ctor,
195 .dtor = _nouveau_volt_dtor, 193 .dtor = _nvkm_volt_dtor,
196 .init = _nouveau_volt_init, 194 .init = _nvkm_volt_init,
197 .fini = _nouveau_volt_fini, 195 .fini = _nvkm_volt_fini,
198 }, 196 },
199}; 197};
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
index 755fa91bcd09..b778deb32d93 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
@@ -21,10 +21,10 @@
21 * 21 *
22 * Authors: Ben Skeggs 22 * Authors: Ben Skeggs
23 */ 23 */
24
25#include <subdev/volt.h> 24#include <subdev/volt.h>
26#include <subdev/gpio.h> 25#include <subdev/bios.h>
27#include <subdev/bios/gpio.h> 26#include <subdev/bios/gpio.h>
27#include <subdev/gpio.h>
28 28
29static const u8 tags[] = { 29static const u8 tags[] = {
30 DCB_GPIO_VID0, DCB_GPIO_VID1, DCB_GPIO_VID2, DCB_GPIO_VID3, 30 DCB_GPIO_VID0, DCB_GPIO_VID1, DCB_GPIO_VID2, DCB_GPIO_VID3,
@@ -32,9 +32,9 @@ static const u8 tags[] = {
32}; 32};
33 33
34int 34int
35nouveau_voltgpio_get(struct nouveau_volt *volt) 35nvkm_voltgpio_get(struct nvkm_volt *volt)
36{ 36{
37 struct nouveau_gpio *gpio = nouveau_gpio(volt); 37 struct nvkm_gpio *gpio = nvkm_gpio(volt);
38 u8 vid = 0; 38 u8 vid = 0;
39 int i; 39 int i;
40 40
@@ -51,9 +51,9 @@ nouveau_voltgpio_get(struct nouveau_volt *volt)
51} 51}
52 52
53int 53int
54nouveau_voltgpio_set(struct nouveau_volt *volt, u8 vid) 54nvkm_voltgpio_set(struct nvkm_volt *volt, u8 vid)
55{ 55{
56 struct nouveau_gpio *gpio = nouveau_gpio(volt); 56 struct nvkm_gpio *gpio = nvkm_gpio(volt);
57 int i; 57 int i;
58 58
59 for (i = 0; i < ARRAY_SIZE(tags); i++, vid >>= 1) { 59 for (i = 0; i < ARRAY_SIZE(tags); i++, vid >>= 1) {
@@ -68,9 +68,9 @@ nouveau_voltgpio_set(struct nouveau_volt *volt, u8 vid)
68} 68}
69 69
70int 70int
71nouveau_voltgpio_init(struct nouveau_volt *volt) 71nvkm_voltgpio_init(struct nvkm_volt *volt)
72{ 72{
73 struct nouveau_gpio *gpio = nouveau_gpio(volt); 73 struct nvkm_gpio *gpio = nvkm_gpio(volt);
74 struct dcb_gpio_func func; 74 struct dcb_gpio_func func;
75 int i; 75 int i;
76 76
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/nv40.c
index 87d5358376a6..0ac5a3f8c9a8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/nv40.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/nv40.c
@@ -21,22 +21,21 @@
21 * 21 *
22 * Authors: Ben Skeggs 22 * Authors: Ben Skeggs
23 */ 23 */
24
25#include <subdev/volt.h> 24#include <subdev/volt.h>
26 25
27struct nv40_volt_priv { 26struct nv40_volt_priv {
28 struct nouveau_volt base; 27 struct nvkm_volt base;
29}; 28};
30 29
31static int 30static int
32nv40_volt_ctor(struct nouveau_object *parent, struct nouveau_object *engine, 31nv40_volt_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
33 struct nouveau_oclass *oclass, void *data, u32 size, 32 struct nvkm_oclass *oclass, void *data, u32 size,
34 struct nouveau_object **pobject) 33 struct nvkm_object **pobject)
35{ 34{
36 struct nv40_volt_priv *priv; 35 struct nv40_volt_priv *priv;
37 int ret; 36 int ret;
38 37
39 ret = nouveau_volt_create(parent, engine, oclass, &priv); 38 ret = nvkm_volt_create(parent, engine, oclass, &priv);
40 *pobject = nv_object(priv); 39 *pobject = nv_object(priv);
41 if (ret) 40 if (ret)
42 return ret; 41 return ret;
@@ -44,13 +43,13 @@ nv40_volt_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
44 return 0; 43 return 0;
45} 44}
46 45
47struct nouveau_oclass 46struct nvkm_oclass
48nv40_volt_oclass = { 47nv40_volt_oclass = {
49 .handle = NV_SUBDEV(VOLT, 0x40), 48 .handle = NV_SUBDEV(VOLT, 0x40),
50 .ofuncs = &(struct nouveau_ofuncs) { 49 .ofuncs = &(struct nvkm_ofuncs) {
51 .ctor = nv40_volt_ctor, 50 .ctor = nv40_volt_ctor,
52 .dtor = _nouveau_volt_dtor, 51 .dtor = _nvkm_volt_dtor,
53 .init = _nouveau_volt_init, 52 .init = _nvkm_volt_init,
54 .fini = _nouveau_volt_fini, 53 .fini = _nvkm_volt_fini,
55 }, 54 },
56}; 55};