1 /* $NetBSD: nv50.h,v 1.3 2021/12/18 23:45:39 riastradh Exp $ */ 2 3 /* SPDX-License-Identifier: MIT */ 4 #ifndef __NV50_CLK_H__ 5 #define __NV50_CLK_H__ 6 #define nv50_clk(p) container_of((p), struct nv50_clk, base) 7 #include "priv.h" 8 9 #include <subdev/bus/hwsq.h> 10 11 struct nv50_clk_hwsq { 12 struct hwsq base; 13 struct hwsq_reg r_fifo; 14 struct hwsq_reg r_spll[2]; 15 struct hwsq_reg r_nvpll[2]; 16 struct hwsq_reg r_divs; 17 struct hwsq_reg r_mast; 18 }; 19 20 struct nv50_clk { 21 struct nvkm_clk base; 22 struct nv50_clk_hwsq hwsq; 23 }; 24 25 int nv50_clk_new_(const struct nvkm_clk_func *, struct nvkm_device *, int, 26 bool, struct nvkm_clk **); 27 int nv50_clk_read(struct nvkm_clk *, enum nv_clk_src); 28 int nv50_clk_calc(struct nvkm_clk *, struct nvkm_cstate *); 29 int nv50_clk_prog(struct nvkm_clk *); 30 void nv50_clk_tidy(struct nvkm_clk *); 31 #endif 32