priv.h 915 B

1234567891011121314151617181920212223242526
  1. #ifndef __NVKM_CLK_PRIV_H__
  2. #define __NVKM_CLK_PRIV_H__
  3. #define nvkm_clk(p) container_of((p), struct nvkm_clk, subdev)
  4. #include <subdev/clk.h>
  5. struct nvkm_clk_func {
  6. int (*init)(struct nvkm_clk *);
  7. void (*fini)(struct nvkm_clk *);
  8. int (*read)(struct nvkm_clk *, enum nv_clk_src);
  9. int (*calc)(struct nvkm_clk *, struct nvkm_cstate *);
  10. int (*prog)(struct nvkm_clk *);
  11. void (*tidy)(struct nvkm_clk *);
  12. struct nvkm_pstate *pstates;
  13. int nr_pstates;
  14. struct nvkm_domain domains[];
  15. };
  16. int nvkm_clk_ctor(const struct nvkm_clk_func *, struct nvkm_device *, int,
  17. bool allow_reclock, struct nvkm_clk *);
  18. int nvkm_clk_new_(const struct nvkm_clk_func *, struct nvkm_device *, int,
  19. bool allow_reclock, struct nvkm_clk **);
  20. int nv04_clk_pll_calc(struct nvkm_clk *, struct nvbios_pll *, int clk,
  21. struct nvkm_pll_vals *);
  22. int nv04_clk_pll_prog(struct nvkm_clk *, u32 reg1, struct nvkm_pll_vals *);
  23. #endif