Lines Matching defs:xvip
134 static inline u32 xvip_read(struct xvip_device *xvip, u32 addr)
136 return ioread32(xvip->iomem + addr);
139 static inline void xvip_write(struct xvip_device *xvip, u32 addr, u32 value)
141 iowrite32(value, xvip->iomem + addr);
144 static inline void xvip_clr(struct xvip_device *xvip, u32 addr, u32 clr)
146 xvip_write(xvip, addr, xvip_read(xvip, addr) & ~clr);
149 static inline void xvip_set(struct xvip_device *xvip, u32 addr, u32 set)
151 xvip_write(xvip, addr, xvip_read(xvip, addr) | set);
154 void xvip_clr_or_set(struct xvip_device *xvip, u32 addr, u32 mask, bool set);
155 void xvip_clr_and_set(struct xvip_device *xvip, u32 addr, u32 clr, u32 set);
157 int xvip_init_resources(struct xvip_device *xvip);
158 void xvip_cleanup_resources(struct xvip_device *xvip);
160 static inline void xvip_reset(struct xvip_device *xvip)
162 xvip_write(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_SW_RESET);
165 static inline void xvip_start(struct xvip_device *xvip)
167 xvip_set(xvip, XVIP_CTRL_CONTROL,
171 static inline void xvip_stop(struct xvip_device *xvip)
173 xvip_clr(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_SW_ENABLE);
176 static inline void xvip_resume(struct xvip_device *xvip)
178 xvip_write(xvip, XVIP_CTRL_CONTROL,
179 xvip->saved_ctrl | XVIP_CTRL_CONTROL_SW_ENABLE);
182 static inline void xvip_suspend(struct xvip_device *xvip)
184 xvip->saved_ctrl = xvip_read(xvip, XVIP_CTRL_CONTROL);
185 xvip_write(xvip, XVIP_CTRL_CONTROL,
186 xvip->saved_ctrl & ~XVIP_CTRL_CONTROL_SW_ENABLE);
189 static inline void xvip_set_frame_size(struct xvip_device *xvip,
192 xvip_write(xvip, XVIP_ACTIVE_SIZE,
197 static inline void xvip_get_frame_size(struct xvip_device *xvip,
202 reg = xvip_read(xvip, XVIP_ACTIVE_SIZE);
209 static inline void xvip_enable_reg_update(struct xvip_device *xvip)
211 xvip_set(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_REG_UPDATE);
214 static inline void xvip_disable_reg_update(struct xvip_device *xvip)
216 xvip_clr(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_REG_UPDATE);
219 static inline void xvip_print_version(struct xvip_device *xvip)
223 version = xvip_read(xvip, XVIP_CTRL_VERSION);
225 dev_info(xvip->dev, "device found, version %u.%02x%x\n",