#ifndef __XILINX_VIP_H__
#define __XILINX_VIP_H__
#include <linux/bitops.h>
#include <linux/io.h>
#include <media/v4l2-subdev.h>
struct clk;
#define XVIP_MIN_WIDTH …
#define XVIP_MAX_WIDTH …
#define XVIP_MIN_HEIGHT …
#define XVIP_MAX_HEIGHT …
#define XVIP_PAD_SINK …
#define XVIP_PAD_SOURCE …
#define XVIP_CTRL_CONTROL …
#define XVIP_CTRL_CONTROL_SW_ENABLE …
#define XVIP_CTRL_CONTROL_REG_UPDATE …
#define XVIP_CTRL_CONTROL_BYPASS …
#define XVIP_CTRL_CONTROL_TEST_PATTERN …
#define XVIP_CTRL_CONTROL_FRAME_SYNC_RESET …
#define XVIP_CTRL_CONTROL_SW_RESET …
#define XVIP_CTRL_STATUS …
#define XVIP_CTRL_STATUS_PROC_STARTED …
#define XVIP_CTRL_STATUS_EOF …
#define XVIP_CTRL_ERROR …
#define XVIP_CTRL_ERROR_SLAVE_EOL_EARLY …
#define XVIP_CTRL_ERROR_SLAVE_EOL_LATE …
#define XVIP_CTRL_ERROR_SLAVE_SOF_EARLY …
#define XVIP_CTRL_ERROR_SLAVE_SOF_LATE …
#define XVIP_CTRL_IRQ_ENABLE …
#define XVIP_CTRL_IRQ_ENABLE_PROC_STARTED …
#define XVIP_CTRL_IRQ_EOF …
#define XVIP_CTRL_VERSION …
#define XVIP_CTRL_VERSION_MAJOR_MASK …
#define XVIP_CTRL_VERSION_MAJOR_SHIFT …
#define XVIP_CTRL_VERSION_MINOR_MASK …
#define XVIP_CTRL_VERSION_MINOR_SHIFT …
#define XVIP_CTRL_VERSION_REVISION_MASK …
#define XVIP_CTRL_VERSION_REVISION_SHIFT …
#define XVIP_CTRL_VERSION_PATCH_MASK …
#define XVIP_CTRL_VERSION_PATCH_SHIFT …
#define XVIP_CTRL_VERSION_INTERNAL_MASK …
#define XVIP_CTRL_VERSION_INTERNAL_SHIFT …
#define XVIP_ACTIVE_SIZE …
#define XVIP_ACTIVE_VSIZE_MASK …
#define XVIP_ACTIVE_VSIZE_SHIFT …
#define XVIP_ACTIVE_HSIZE_MASK …
#define XVIP_ACTIVE_HSIZE_SHIFT …
#define XVIP_ENCODING …
#define XVIP_ENCODING_NBITS_8 …
#define XVIP_ENCODING_NBITS_10 …
#define XVIP_ENCODING_NBITS_12 …
#define XVIP_ENCODING_NBITS_16 …
#define XVIP_ENCODING_NBITS_MASK …
#define XVIP_ENCODING_NBITS_SHIFT …
#define XVIP_ENCODING_VIDEO_FORMAT_YUV422 …
#define XVIP_ENCODING_VIDEO_FORMAT_YUV444 …
#define XVIP_ENCODING_VIDEO_FORMAT_RGB …
#define XVIP_ENCODING_VIDEO_FORMAT_YUV420 …
#define XVIP_ENCODING_VIDEO_FORMAT_MASK …
#define XVIP_ENCODING_VIDEO_FORMAT_SHIFT …
struct xvip_device { … };
struct xvip_video_format { … };
const struct xvip_video_format *xvip_get_format_by_code(unsigned int code);
const struct xvip_video_format *xvip_get_format_by_fourcc(u32 fourcc);
const struct xvip_video_format *xvip_of_get_format(struct device_node *node);
void xvip_set_format_size(struct v4l2_mbus_framefmt *format,
const struct v4l2_subdev_format *fmt);
int xvip_enum_mbus_code(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code);
int xvip_enum_frame_size(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse);
static inline u32 xvip_read(struct xvip_device *xvip, u32 addr)
{ … }
static inline void xvip_write(struct xvip_device *xvip, u32 addr, u32 value)
{ … }
static inline void xvip_clr(struct xvip_device *xvip, u32 addr, u32 clr)
{ … }
static inline void xvip_set(struct xvip_device *xvip, u32 addr, u32 set)
{ … }
void xvip_clr_or_set(struct xvip_device *xvip, u32 addr, u32 mask, bool set);
void xvip_clr_and_set(struct xvip_device *xvip, u32 addr, u32 clr, u32 set);
int xvip_init_resources(struct xvip_device *xvip);
void xvip_cleanup_resources(struct xvip_device *xvip);
static inline void xvip_reset(struct xvip_device *xvip)
{ … }
static inline void xvip_start(struct xvip_device *xvip)
{ … }
static inline void xvip_stop(struct xvip_device *xvip)
{ … }
static inline void xvip_resume(struct xvip_device *xvip)
{ … }
static inline void xvip_suspend(struct xvip_device *xvip)
{ … }
static inline void xvip_set_frame_size(struct xvip_device *xvip,
const struct v4l2_mbus_framefmt *format)
{ … }
static inline void xvip_get_frame_size(struct xvip_device *xvip,
struct v4l2_mbus_framefmt *format)
{ … }
static inline void xvip_enable_reg_update(struct xvip_device *xvip)
{ … }
static inline void xvip_disable_reg_update(struct xvip_device *xvip)
{ … }
static inline void xvip_print_version(struct xvip_device *xvip)
{ … }
#endif