{
return nv_exec(obj, mthd, &data, sizeof(data));
}
-
-static inline u8
-nv_ro08(void *obj, u64 addr)
-{
- u8 data = nv_ofuncs(obj)->rd08(obj, addr);
- return data;
-}
-
-static inline u16
-nv_ro16(void *obj, u64 addr)
-{
- u16 data = nv_ofuncs(obj)->rd16(obj, addr);
- return data;
-}
-
-static inline u32
-nv_ro32(void *obj, u64 addr)
-{
- u32 data = nv_ofuncs(obj)->rd32(obj, addr);
- return data;
-}
-
-static inline void
-nv_wo08(void *obj, u64 addr, u8 data)
-{
- nv_ofuncs(obj)->wr08(obj, addr, data);
-}
-
-static inline void
-nv_wo16(void *obj, u64 addr, u16 data)
-{
- nv_ofuncs(obj)->wr16(obj, addr, data);
-}
-
-static inline void
-nv_wo32(void *obj, u64 addr, u32 data)
-{
- nv_ofuncs(obj)->wr32(obj, addr, data);
-}
-
-static inline u32
-nv_mo32(void *obj, u64 addr, u32 mask, u32 data)
-{
- u32 temp = nv_ro32(obj, addr);
- nv_wo32(obj, addr, (temp & ~mask) | data);
- return temp;
-}
#endif
list_del(&iobj->head);
mutex_unlock(&nv_subdev(imem)->mutex);
- return nvkm_object_destroy(&iobj->base);
+ return nvkm_object_destroy(&iobj->object);
}
int
break;
}
- for (i = 0; i < iobj->size; i += 4)
- iobj->suspend[i / 4] = nv_ro32(iobj, i);
+ for (i = 0; i < iobj->size; i += 4) {
+ nvkm_object_rd32(&iobj->object, i, (u32 *)
+ &iobj->suspend[i/4]);
+ }
}
mutex_unlock(&imem->subdev.mutex);
if (ret)
mutex_lock(&imem->subdev.mutex);
list_for_each_entry(iobj, &imem->list, head) {
if (iobj->suspend) {
- for (i = 0; i < iobj->size; i += 4)
- nv_wo32(iobj, i, iobj->suspend[i / 4]);
+ for (i = 0; i < iobj->size; i += 4) {
+ nvkm_object_wr32(&iobj->object, i, *(u32 *)
+ &iobj->suspend[i/4]);
+ }
vfree(iobj->suspend);
iobj->suspend = NULL;
}