nv50.h 712 B

12345678910111213141516171819202122232425262728
  1. #ifndef __NV50_CLK_H__
  2. #define __NV50_CLK_H__
  3. #define nv50_clk(p) container_of((p), struct nv50_clk, base)
  4. #include "priv.h"
  5. #include <subdev/bus/hwsq.h>
  6. struct nv50_clk_hwsq {
  7. struct hwsq base;
  8. struct hwsq_reg r_fifo;
  9. struct hwsq_reg r_spll[2];
  10. struct hwsq_reg r_nvpll[2];
  11. struct hwsq_reg r_divs;
  12. struct hwsq_reg r_mast;
  13. };
  14. struct nv50_clk {
  15. struct nvkm_clk base;
  16. struct nv50_clk_hwsq hwsq;
  17. };
  18. int nv50_clk_new_(const struct nvkm_clk_func *, struct nvkm_device *, int,
  19. bool, struct nvkm_clk **);
  20. int nv50_clk_read(struct nvkm_clk *, enum nv_clk_src);
  21. int nv50_clk_calc(struct nvkm_clk *, struct nvkm_cstate *);
  22. int nv50_clk_prog(struct nvkm_clk *);
  23. void nv50_clk_tidy(struct nvkm_clk *);
  24. #endif