1 #ifndef __NOUVEAU_PWR_H__
2 #define __NOUVEAU_PWR_H__
4 #include <core/subdev.h>
5 #include <core/device.h>
8 struct nouveau_subdev base;
19 struct work_struct work;
20 wait_queue_head_t wait;
26 int (*message)(struct nouveau_pwr *, u32[2], u32, u32, u32, u32);
27 void (*pgob)(struct nouveau_pwr *, bool);
30 static inline struct nouveau_pwr *
31 nouveau_pwr(void *obj)
33 return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_PWR];
36 extern struct nouveau_oclass *nva3_pwr_oclass;
37 extern struct nouveau_oclass *nvc0_pwr_oclass;
38 extern struct nouveau_oclass *nvd0_pwr_oclass;
39 extern struct nouveau_oclass *gk104_pwr_oclass;
40 extern struct nouveau_oclass *nv108_pwr_oclass;
42 /* interface to MEMX process running on PPWR */
44 int nouveau_memx_init(struct nouveau_pwr *, struct nouveau_memx **);
45 int nouveau_memx_fini(struct nouveau_memx **, bool exec);
46 void nouveau_memx_wr32(struct nouveau_memx *, u32 addr, u32 data);
47 void nouveau_memx_wait(struct nouveau_memx *,
48 u32 addr, u32 mask, u32 data, u32 nsec);
49 void nouveau_memx_nsec(struct nouveau_memx *, u32 nsec);