1b138eca6SLyude Paul /*
2b138eca6SLyude Paul  * Copyright 2018 Red Hat Inc.
3b138eca6SLyude Paul  *
4b138eca6SLyude Paul  * Permission is hereby granted, free of charge, to any person obtaining a
5b138eca6SLyude Paul  * copy of this software and associated documentation files (the "Software"),
6b138eca6SLyude Paul  * to deal in the Software without restriction, including without limitation
7b138eca6SLyude Paul  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8b138eca6SLyude Paul  * and/or sell copies of the Software, and to permit persons to whom the
9b138eca6SLyude Paul  * Software is furnished to do so, subject to the following conditions:
10b138eca6SLyude Paul  *
11b138eca6SLyude Paul  * The above copyright notice and this permission notice shall be included in
12b138eca6SLyude Paul  * all copies or substantial portions of the Software.
13b138eca6SLyude Paul  *
14b138eca6SLyude Paul  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15b138eca6SLyude Paul  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16b138eca6SLyude Paul  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17b138eca6SLyude Paul  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18b138eca6SLyude Paul  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19b138eca6SLyude Paul  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20b138eca6SLyude Paul  * OTHER DEALINGS IN THE SOFTWARE.
21b138eca6SLyude Paul  *
22b138eca6SLyude Paul  * Authors: Lyude Paul
23b138eca6SLyude Paul  */
24b138eca6SLyude Paul 
25b138eca6SLyude Paul #ifndef __GK104_THERM_H__
26b138eca6SLyude Paul #define __GK104_THERM_H__
27b138eca6SLyude Paul #define gk104_therm(p) (container_of((p), struct gk104_therm, base))
28b138eca6SLyude Paul 
29b138eca6SLyude Paul #include <subdev/therm.h>
30b138eca6SLyude Paul #include "priv.h"
31b138eca6SLyude Paul #include "gf100.h"
32b138eca6SLyude Paul 
33b138eca6SLyude Paul struct gk104_clkgate_engine_info {
34*93834cb9SBen Skeggs 	enum nvkm_subdev_type type;
35*93834cb9SBen Skeggs 	int inst;
36b138eca6SLyude Paul 	u8 offset;
37b138eca6SLyude Paul };
38b138eca6SLyude Paul 
39b138eca6SLyude Paul struct gk104_therm {
40b138eca6SLyude Paul 	struct nvkm_therm base;
41b138eca6SLyude Paul 
42b138eca6SLyude Paul 	const struct gk104_clkgate_engine_info *clkgate_order;
43b138eca6SLyude Paul 	const struct gf100_idle_filter *idle_filter;
44b138eca6SLyude Paul };
45b138eca6SLyude Paul 
46b138eca6SLyude Paul extern const struct gk104_clkgate_engine_info gk104_clkgate_engine_info[];
47b138eca6SLyude Paul extern const struct gf100_idle_filter gk104_idle_filter;
48b138eca6SLyude Paul 
49b138eca6SLyude Paul #endif
50