Lines Matching full:gmu
22 * These define the different GMU wake up options - these define how both the
23 * CPU and the GMU bring up the hardware
26 /* THe GMU has already been booted and the rentention registers are active */
29 /* the GMU is coming up for the first time or back from a power collapse */
33 * These define the level of control that the GMU has - the higher the number
34 * the more things that the GMU hardware controls on its own.
37 /* The GMU does not do any idle state management */
40 /* The GMU manages SPTP power collapse */
43 /* The GMU does automatic IFPC (intra-frame power collapse) */
49 /* For serializing communication with the GMU: */
101 static inline u32 gmu_read(struct a6xx_gmu *gmu, u32 offset) in gmu_read() argument
103 return msm_readl(gmu->mmio + (offset << 2)); in gmu_read()
106 static inline void gmu_write(struct a6xx_gmu *gmu, u32 offset, u32 value) in gmu_write() argument
108 msm_writel(value, gmu->mmio + (offset << 2)); in gmu_write()
112 gmu_write_bulk(struct a6xx_gmu *gmu, u32 offset, const u32 *data, u32 size) in gmu_write_bulk() argument
114 memcpy_toio(gmu->mmio + (offset << 2), data, size); in gmu_write_bulk()
118 static inline void gmu_rmw(struct a6xx_gmu *gmu, u32 reg, u32 mask, u32 or) in gmu_rmw() argument
120 u32 val = gmu_read(gmu, reg); in gmu_rmw()
124 gmu_write(gmu, reg, val | or); in gmu_rmw()
127 static inline u64 gmu_read64(struct a6xx_gmu *gmu, u32 lo, u32 hi) in gmu_read64() argument
131 val = (u64) msm_readl(gmu->mmio + (lo << 2)); in gmu_read64()
132 val |= ((u64) msm_readl(gmu->mmio + (hi << 2)) << 32); in gmu_read64()
137 #define gmu_poll_timeout(gmu, addr, val, cond, interval, timeout) \ argument
138 readl_poll_timeout((gmu)->mmio + ((addr) << 2), val, cond, \
141 static inline u32 gmu_read_rscc(struct a6xx_gmu *gmu, u32 offset) in gmu_read_rscc() argument
143 return msm_readl(gmu->rscc + (offset << 2)); in gmu_read_rscc()
146 static inline void gmu_write_rscc(struct a6xx_gmu *gmu, u32 offset, u32 value) in gmu_write_rscc() argument
148 msm_writel(value, gmu->rscc + (offset << 2)); in gmu_write_rscc()
151 #define gmu_poll_timeout_rscc(gmu, addr, val, cond, interval, timeout) \ argument
152 readl_poll_timeout((gmu)->rscc + ((addr) << 2), val, cond, \
156 * These are the available OOB (out of band requests) to the GMU where "out of
157 * band" means that the CPU talks to the GMU directly and not through HFI.
160 * bit). The state is cleared by writing the "clear' bit to the GMU interrupt.
162 * These are used to force the GMU/GPU to stay on during a critical sequence or
168 * Let the GMU know that a boot or slumber operation has started. The value in
169 * REG_A6XX_GMU_BOOT_SLUMBER_OPTION lets the GMU know which operation we are
174 * Let the GMU know to not turn off any GPU registers while the CPU is in a
188 void a6xx_hfi_init(struct a6xx_gmu *gmu);
189 int a6xx_hfi_start(struct a6xx_gmu *gmu, int boot_state);
190 void a6xx_hfi_stop(struct a6xx_gmu *gmu);
191 int a6xx_hfi_send_prep_slumber(struct a6xx_gmu *gmu);
192 int a6xx_hfi_set_freq(struct a6xx_gmu *gmu, int index);
194 bool a6xx_gmu_gx_is_on(struct a6xx_gmu *gmu);
195 bool a6xx_gmu_sptprac_is_on(struct a6xx_gmu *gmu);
196 void a6xx_sptprac_disable(struct a6xx_gmu *gmu);
197 int a6xx_sptprac_enable(struct a6xx_gmu *gmu);