• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
6 struct nvkm_clk_func {
7 	int (*init)(struct nvkm_clk *);
8 	void (*fini)(struct nvkm_clk *);
9 	int (*read)(struct nvkm_clk *, enum nv_clk_src);
10 	int (*calc)(struct nvkm_clk *, struct nvkm_cstate *);
11 	int (*prog)(struct nvkm_clk *);
12 	void (*tidy)(struct nvkm_clk *);
13 	struct nvkm_pstate *pstates;
14 	int nr_pstates;
15 	struct nvkm_domain domains[];
16 };
17 
18 int nvkm_clk_ctor(const struct nvkm_clk_func *, struct nvkm_device *, int,
19 		  bool allow_reclock, struct nvkm_clk *);
20 int nvkm_clk_new_(const struct nvkm_clk_func *, struct nvkm_device *, int,
21 		  bool allow_reclock, struct nvkm_clk **);
22 
23 int nv04_clk_pll_calc(struct nvkm_clk *, struct nvbios_pll *, int clk,
24 		      struct nvkm_pll_vals *);
25 int nv04_clk_pll_prog(struct nvkm_clk *, u32 reg1, struct nvkm_pll_vals *);
26 #endif
27