diff options
Diffstat (limited to 'bin/nv_rsfunc.h')
-rw-r--r-- | bin/nv_rsfunc.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/bin/nv_rsfunc.h b/bin/nv_rsfunc.h index c73f1f737..47b53fee8 100644 --- a/bin/nv_rsfunc.h +++ b/bin/nv_rsfunc.h @@ -1,19 +1,17 @@ #include <stdlib.h> -#include <core/os.h> -#include <core/object.h> -#include <core/device.h> +#include <nvif/device.h> static CAST -nv_rsys(struct nouveau_object *device, u64 addr) +nv_rsys(struct nvif_device *device, u64 addr) { - if (nv_device(device)->card_type >= NV_50 && - nv_device(device)->card_type <= NV_E0) { + if (device->info.family >= NV_DEVICE_INFO_V0_TESLA && + device->info.family <= NV_DEVICE_INFO_V0_MAXWELL) { CAST data; - u32 pmem = nv_ro32(device, 0x001700); - nv_wo32(device, 0x001700, 0x02000000 | (addr >> 16)); + u32 pmem = nvif_rd32(device, 0x001700); + nvif_wr32(device, 0x001700, 0x02000000 | (addr >> 16)); data = RSYS(device, 0x700000 + (addr & 0xffffULL)); - nv_wo32(device, 0x001700, pmem); + nvif_wr32(device, 0x001700, pmem); return data; } else { printk("unsupported chipset\n"); |