Lines Matching refs:xvip
138 static inline u32 xvip_read(struct xvip_device *xvip, u32 addr) in xvip_read() argument
140 return ioread32(xvip->iomem + addr); in xvip_read()
143 static inline void xvip_write(struct xvip_device *xvip, u32 addr, u32 value) in xvip_write() argument
145 iowrite32(value, xvip->iomem + addr); in xvip_write()
148 static inline void xvip_clr(struct xvip_device *xvip, u32 addr, u32 clr) in xvip_clr() argument
150 xvip_write(xvip, addr, xvip_read(xvip, addr) & ~clr); in xvip_clr()
153 static inline void xvip_set(struct xvip_device *xvip, u32 addr, u32 set) in xvip_set() argument
155 xvip_write(xvip, addr, xvip_read(xvip, addr) | set); in xvip_set()
158 void xvip_clr_or_set(struct xvip_device *xvip, u32 addr, u32 mask, bool set);
159 void xvip_clr_and_set(struct xvip_device *xvip, u32 addr, u32 clr, u32 set);
161 int xvip_init_resources(struct xvip_device *xvip);
162 void xvip_cleanup_resources(struct xvip_device *xvip);
164 static inline void xvip_reset(struct xvip_device *xvip) in xvip_reset() argument
166 xvip_write(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_SW_RESET); in xvip_reset()
169 static inline void xvip_start(struct xvip_device *xvip) in xvip_start() argument
171 xvip_set(xvip, XVIP_CTRL_CONTROL, in xvip_start()
175 static inline void xvip_stop(struct xvip_device *xvip) in xvip_stop() argument
177 xvip_clr(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_SW_ENABLE); in xvip_stop()
180 static inline void xvip_resume(struct xvip_device *xvip) in xvip_resume() argument
182 xvip_write(xvip, XVIP_CTRL_CONTROL, in xvip_resume()
183 xvip->saved_ctrl | XVIP_CTRL_CONTROL_SW_ENABLE); in xvip_resume()
186 static inline void xvip_suspend(struct xvip_device *xvip) in xvip_suspend() argument
188 xvip->saved_ctrl = xvip_read(xvip, XVIP_CTRL_CONTROL); in xvip_suspend()
189 xvip_write(xvip, XVIP_CTRL_CONTROL, in xvip_suspend()
190 xvip->saved_ctrl & ~XVIP_CTRL_CONTROL_SW_ENABLE); in xvip_suspend()
193 static inline void xvip_set_frame_size(struct xvip_device *xvip, in xvip_set_frame_size() argument
196 xvip_write(xvip, XVIP_ACTIVE_SIZE, in xvip_set_frame_size()
201 static inline void xvip_get_frame_size(struct xvip_device *xvip, in xvip_get_frame_size() argument
206 reg = xvip_read(xvip, XVIP_ACTIVE_SIZE); in xvip_get_frame_size()
213 static inline void xvip_enable_reg_update(struct xvip_device *xvip) in xvip_enable_reg_update() argument
215 xvip_set(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_REG_UPDATE); in xvip_enable_reg_update()
218 static inline void xvip_disable_reg_update(struct xvip_device *xvip) in xvip_disable_reg_update() argument
220 xvip_clr(xvip, XVIP_CTRL_CONTROL, XVIP_CTRL_CONTROL_REG_UPDATE); in xvip_disable_reg_update()
223 static inline void xvip_print_version(struct xvip_device *xvip) in xvip_print_version() argument
227 version = xvip_read(xvip, XVIP_CTRL_VERSION); in xvip_print_version()
229 dev_info(xvip->dev, "device found, version %u.%02x%x\n", in xvip_print_version()