summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/fuse
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 07:54:09 +0300
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 05:40:14 +0300
commit2bdb4995fd9629840ed80305f2a9f046071881d7 (patch)
treebc8a6ee4f7c260b8bca67739dbb6633778524a16 /drivers/gpu/drm/nouveau/nvkm/subdev/fuse
parent6758745b2821bddcec1aae0c4cffaa9608aeda59 (diff)
downloadlinux-2bdb4995fd9629840ed80305f2a9f046071881d7.tar.xz
drm/nouveau/fuse: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/fuse')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c11
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c3
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c7
3 files changed, 12 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c
index 8f0eeb952e7a..e9d432424071 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gf100.c
@@ -33,16 +33,17 @@ static u32
gf100_fuse_rd32(struct nvkm_object *object, u64 addr)
{
struct gf100_fuse *fuse = (void *)object;
+ struct nvkm_device *device = fuse->base.subdev.device;
unsigned long flags;
u32 fuse_enable, unk, val;
/* racy if another part of nvkm start writing to these regs */
spin_lock_irqsave(&fuse->fuse_enable_lock, flags);
- fuse_enable = nv_mask(fuse, 0x22400, 0x800, 0x800);
- unk = nv_mask(fuse, 0x21000, 0x1, 0x1);
- val = nv_rd32(fuse, 0x21100 + addr);
- nv_wr32(fuse, 0x21000, unk);
- nv_wr32(fuse, 0x22400, fuse_enable);
+ fuse_enable = nvkm_mask(device, 0x22400, 0x800, 0x800);
+ unk = nvkm_mask(device, 0x21000, 0x1, 0x1);
+ val = nvkm_rd32(device, 0x21100 + addr);
+ nvkm_wr32(device, 0x21000, unk);
+ nvkm_wr32(device, 0x22400, fuse_enable);
spin_unlock_irqrestore(&fuse->fuse_enable_lock, flags);
return val;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c
index e669b648e8fa..94594ac9990b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/gm107.c
@@ -27,7 +27,8 @@ static u32
gm107_fuse_rd32(struct nvkm_object *object, u64 addr)
{
struct nvkm_fuse *fuse = (void *)object;
- return nv_rd32(fuse, 0x21100 + addr);
+ struct nvkm_device *device = fuse->subdev.device;
+ return nvkm_rd32(device, 0x21100 + addr);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c
index ac9d5fd3e8d1..c47abfa98809 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/nv50.c
@@ -33,14 +33,15 @@ static u32
nv50_fuse_rd32(struct nvkm_object *object, u64 addr)
{
struct nv50_fuse *fuse = (void *)object;
+ struct nvkm_device *device = fuse->base.subdev.device;
unsigned long flags;
u32 fuse_enable, val;
/* racy if another part of nvkm start writing to this reg */
spin_lock_irqsave(&fuse->fuse_enable_lock, flags);
- fuse_enable = nv_mask(fuse, 0x1084, 0x800, 0x800);
- val = nv_rd32(fuse, 0x21000 + addr);
- nv_wr32(fuse, 0x1084, fuse_enable);
+ fuse_enable = nvkm_mask(device, 0x1084, 0x800, 0x800);
+ val = nvkm_rd32(device, 0x21000 + addr);
+ nvkm_wr32(device, 0x1084, fuse_enable);
spin_unlock_irqrestore(&fuse->fuse_enable_lock, flags);
return val;
}