Lines Matching refs:therm
34 g84_temp_get(struct nvkm_therm *therm) in g84_temp_get() argument
36 struct nvkm_fuse *fuse = nvkm_fuse(therm); in g84_temp_get()
39 return nv_rd32(therm, 0x20400); in g84_temp_get()
45 g84_sensor_setup(struct nvkm_therm *therm) in g84_sensor_setup() argument
47 struct nvkm_fuse *fuse = nvkm_fuse(therm); in g84_sensor_setup()
51 nv_mask(therm, 0x20008, 0x80008000, 0x80000000); in g84_sensor_setup()
52 nv_mask(therm, 0x2000c, 0x80000003, 0x00000000); in g84_sensor_setup()
58 g84_therm_program_alarms(struct nvkm_therm *therm) in g84_therm_program_alarms() argument
60 struct nvkm_therm_priv *priv = (void *)therm; in g84_therm_program_alarms()
67 nv_wr32(therm, 0x20000, 0x000003ff); in g84_therm_program_alarms()
70 nv_wr32(therm, 0x20484, sensor->thrs_shutdown.hysteresis); in g84_therm_program_alarms()
71 nv_wr32(therm, 0x20480, sensor->thrs_shutdown.temp); in g84_therm_program_alarms()
74 nv_wr32(therm, 0x204c4, sensor->thrs_fan_boost.temp); in g84_therm_program_alarms()
77 nv_wr32(therm, 0x204c0, sensor->thrs_critical.temp); in g84_therm_program_alarms()
80 nv_wr32(therm, 0x20414, sensor->thrs_down_clock.temp); in g84_therm_program_alarms()
83 nv_debug(therm, in g84_therm_program_alarms()
95 g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm, in g84_therm_threshold_hyst_emulation() argument
104 prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name); in g84_therm_threshold_hyst_emulation()
105 temp = nv_rd32(therm, thrs_reg); in g84_therm_threshold_hyst_emulation()
109 nv_wr32(therm, thrs_reg, thrs->temp - thrs->hysteresis); in g84_therm_threshold_hyst_emulation()
112 nv_wr32(therm, thrs_reg, thrs->temp); in g84_therm_threshold_hyst_emulation()
117 cur = therm->temp_get(therm); in g84_therm_threshold_hyst_emulation()
123 nvkm_therm_sensor_set_threshold_state(therm, thrs_name, new_state); in g84_therm_threshold_hyst_emulation()
134 nvkm_therm_sensor_event(therm, thrs_name, direction); in g84_therm_threshold_hyst_emulation()
140 struct nvkm_therm *therm = nvkm_therm(subdev); in g84_therm_intr() local
141 struct nvkm_therm_priv *priv = (void *)therm; in g84_therm_intr()
148 intr = nv_rd32(therm, 0x20100) & 0x3ff; in g84_therm_intr()
152 g84_therm_threshold_hyst_emulation(therm, 0x20414, 24, in g84_therm_intr()
160 g84_therm_threshold_hyst_emulation(therm, 0x20480, 20, in g84_therm_intr()
168 g84_therm_threshold_hyst_emulation(therm, 0x204c4, 21, in g84_therm_intr()
176 g84_therm_threshold_hyst_emulation(therm, 0x204c0, 22, in g84_therm_intr()
183 nv_error(therm, "unhandled intr 0x%08x\n", intr); in g84_therm_intr()
186 nv_wr32(therm, 0x20100, 0xffffffff); in g84_therm_intr()
187 nv_wr32(therm, 0x1100, 0x10000); /* PBUS */ in g84_therm_intr()