Lines Matching refs:reg
45 uint32_t reg, timeout = 0; in ext_tsen_probe() local
57 reg = mmio_read_32((uintptr_t)&base->ext_tsen_ctrl_lsb); in ext_tsen_probe()
58 reg &= ~THERMAL_SEN_CTRL_LSB_RST_OFFSET; /* de-assert TSEN_RESET */ in ext_tsen_probe()
59 reg |= THERMAL_SEN_CTRL_LSB_EN_MASK; /* set TSEN_EN to 1 */ in ext_tsen_probe()
60 reg |= THERMAL_SEN_CTRL_LSB_STRT_MASK; /* set TSEN_START to 1 */ in ext_tsen_probe()
61 mmio_write_32((uintptr_t)&base->ext_tsen_ctrl_lsb, reg); in ext_tsen_probe()
63 reg = mmio_read_32((uintptr_t)&base->ext_tsen_status); in ext_tsen_probe()
64 while ((reg & THERMAL_SEN_CTRL_STATS_VALID_MASK) == 0 && in ext_tsen_probe()
67 reg = mmio_read_32((uintptr_t)&base->ext_tsen_status); in ext_tsen_probe()
71 if ((reg & THERMAL_SEN_CTRL_STATS_VALID_MASK) == 0) { in ext_tsen_probe()
85 uint32_t reg; in ext_tsen_read() local
94 reg = mmio_read_32((uintptr_t)&base->ext_tsen_status); in ext_tsen_read()
95 reg = ((reg & THERMAL_SEN_CTRL_STATS_TEMP_OUT_MASK) >> in ext_tsen_read()
103 if (reg >= THERMAL_SEN_OUTPUT_MSB) in ext_tsen_read()
104 reg -= THERMAL_SEN_OUTPUT_COMP; in ext_tsen_read()
111 *temp = ((tsen_cfg->tsen_gain * ((int)reg)) + in ext_tsen_read()