summaryrefslogtreecommitdiff
path: root/bin/nv_wifunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'bin/nv_wifunc.h')
-rw-r--r--bin/nv_wifunc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/nv_wifunc.h b/bin/nv_wifunc.h
index 0525b8423..aaa597c2d 100644
--- a/bin/nv_wifunc.h
+++ b/bin/nv_wifunc.h
@@ -8,7 +8,7 @@ static u64 map_page = ~0ULL;
static void
nv_wfb(struct nvif_device *device, u64 offset, CAST data)
{
- struct pci_dev *pdev = nvxx_device(device)->pdev;
+ struct nvkm_device *nv = nvxx_device(device);
u64 page = (offset & ~(PAGE_SIZE - 1));
u64 addr = (offset & (PAGE_SIZE - 1));
@@ -22,11 +22,11 @@ nv_wfb(struct nvif_device *device, u64 offset, CAST data)
if (map)
iounmap(map);
- if (pci_resource_len(pdev, 2)) {
- map = ioremap(pci_resource_start(pdev, 2) +
+ if (nv->func->resource_size(nv, 2)) {
+ map = ioremap(nv->func->resource_addr(nv, 2) +
page, PAGE_SIZE);
} else {
- map = ioremap(pci_resource_start(pdev, 3) +
+ map = ioremap(nv->func->resource_addr(nv, 3) +
page, PAGE_SIZE);
}