summaryrefslogtreecommitdiff
path: root/bin/nv_wffunc.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:37:44 +1000
commiteeeb40c6398c7a9d2b194038193d98e3d6068a2f (patch)
tree77336796ea85c47522c6c660878413f6095d59a5 /bin/nv_wffunc.h
parent3429f5fd3a2e989f7c93e86ab7c6d8381162c011 (diff)
downloadnouveau-eeeb40c6398c7a9d2b194038193d98e3d6068a2f.tar.gz
device: cleaner abstraction for device resource functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'bin/nv_wffunc.h')
-rw-r--r--bin/nv_wffunc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/nv_wffunc.h b/bin/nv_wffunc.h
index 6efa67e2f..94f54146f 100644
--- a/bin/nv_wffunc.h
+++ b/bin/nv_wffunc.h
@@ -8,6 +8,7 @@ static u64 map_page = ~0ULL;
static void
nv_wfb(struct nvif_device *device, u64 offset, CAST data)
{
+ struct nvkm_device *nv = nvxx_device(device);
u64 page = (offset & ~(PAGE_SIZE - 1));
u64 addr = (offset & (PAGE_SIZE - 1));
@@ -21,8 +22,7 @@ nv_wfb(struct nvif_device *device, u64 offset, CAST data)
if (map)
iounmap(map);
- map = ioremap(pci_resource_start(nvxx_device(device)->pdev, 1) +
- page, PAGE_SIZE);
+ map = ioremap(nv->func->resource_addr(nv, 1) + page, PAGE_SIZE);
if (!map) {
printk("map failed\n");
exit(1);