Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 #ifndef __NVKM_CLK_PRIV_H__
0003 #define __NVKM_CLK_PRIV_H__
0004 #define nvkm_clk(p) container_of((p), struct nvkm_clk, subdev)
0005 #include <subdev/clk.h>
0006 
0007 struct nvkm_clk_func {
0008     int (*init)(struct nvkm_clk *);
0009     void (*fini)(struct nvkm_clk *);
0010     int (*read)(struct nvkm_clk *, enum nv_clk_src);
0011     int (*calc)(struct nvkm_clk *, struct nvkm_cstate *);
0012     int (*prog)(struct nvkm_clk *);
0013     void (*tidy)(struct nvkm_clk *);
0014     struct nvkm_pstate *pstates;
0015     int nr_pstates;
0016     struct nvkm_domain domains[];
0017 };
0018 
0019 int nvkm_clk_ctor(const struct nvkm_clk_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
0020           bool allow_reclock, struct nvkm_clk *);
0021 int nvkm_clk_new_(const struct nvkm_clk_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
0022           bool allow_reclock, struct nvkm_clk **);
0023 
0024 int nv04_clk_pll_calc(struct nvkm_clk *, struct nvbios_pll *, int clk,
0025               struct nvkm_pll_vals *);
0026 int nv04_clk_pll_prog(struct nvkm_clk *, u32 reg1, struct nvkm_pll_vals *);
0027 #endif