linux/drivers/media/platform/samsung/exynos4-is/fimc-is.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Samsung EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver
 *
 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
 *
 * Authors: Younghwan Joo <[email protected]>
 *          Sylwester Nawrocki <[email protected]>
 */
#ifndef FIMC_IS_H_
#define FIMC_IS_H_

#include <asm/barrier.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/sizes.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <media/videobuf2-v4l2.h>
#include <media/v4l2-ctrls.h>

#include "fimc-isp.h"
#include "fimc-is-command.h"
#include "fimc-is-sensor.h"
#include "fimc-is-param.h"
#include "fimc-is-regs.h"

#define FIMC_IS_DRV_NAME

#define FIMC_IS_FW_FILENAME
#define FIMC_IS_SETFILE_6A3

#define FIMC_IS_FW_LOAD_TIMEOUT
#define FIMC_IS_POWER_ON_TIMEOUT

#define FIMC_IS_SENSORS_NUM

/* Memory definitions */
#define FIMC_IS_CPU_MEM_SIZE
#define FIMC_IS_CPU_BASE_MASK
#define FIMC_IS_REGION_SIZE

#define FIMC_IS_DEBUG_REGION_OFFSET
#define FIMC_IS_SHARED_REGION_OFFSET
#define FIMC_IS_FW_INFO_LEN
#define FIMC_IS_FW_VER_LEN
#define FIMC_IS_FW_DESC_LEN
#define FIMC_IS_SETFILE_INFO_LEN

#define FIMC_IS_EXTRA_MEM_SIZE
#define FIMC_IS_EXTRA_FW_SIZE
#define FIMC_IS_EXTRA_SETFILE_SIZE

/* TODO: revisit */
#define FIMC_IS_FW_ADDR_MASK
#define FIMC_IS_FW_SIZE_MAX
#define FIMC_IS_FW_SIZE_MIN

#define ATCLK_MCUISP_FREQUENCY
#define ACLK_AXI_FREQUENCY

enum {};

/* The driver's internal state flags */
enum {};

enum af_state {};

enum af_lock_state {};

enum ae_lock_state {};

enum awb_lock_state {};

enum {};

struct is_setfile {};

struct is_fd_result_header {};

struct is_af_info {};

struct fimc_is_firmware {};

struct fimc_is_memory {};

#define FIMC_IS_I2H_MAX_ARGS

struct i2h_cmd {};

struct h2i_cmd {};

#define FIMC_IS_DEBUG_MSG
#define FIMC_IS_DEBUG_LEVEL

struct fimc_is_setfile {};

struct chain_config {};

/**
 * struct fimc_is - fimc-is data structure
 * @pdev: pointer to FIMC-IS platform device
 * @v4l2_dev: pointer to the top level v4l2_device
 * @fw: data structure describing the FIMC-IS firmware binary
 * @memory: memory region assigned for the FIMC-IS (firmware)
 * @isp: the ISP block data structure
 * @sensor: fimc-is sensor subdevice array
 * @setfile: descriptor of the imaging pipeline calibration data
 * @ctrl_handler: the v4l2 controls handler
 * @lock: mutex serializing video device and the subdev operations
 * @slock: spinlock protecting this data structure and the hw registers
 * @clocks: FIMC-LITE gate clock
 * @regs: MCUCTL mmapped registers region
 * @pmu_regs: PMU ISP mmapped registers region
 * @irq: FIMC-IS interrupt
 * @irq_queue: interrupt handling waitqueue
 * @lpm: low power mode flag
 * @state: internal driver's state flags
 * @sensor_index: image sensor index for the firmware
 * @i2h_cmd: FIMC-IS to the host (CPU) mailbox command data structure
 * @h2i_cmd: the host (CPU) to FIMC-IS mailbox command data structure
 * @fd_header: the face detection result data structure
 * @config: shared HW pipeline configuration data
 * @config_index: index to the @config entry currently in use
 * @is_p_region: pointer to the shared parameter memory region
 * @is_dma_p_region: DMA address of the shared parameter memory region
 * @is_shared_region: pointer to the IS shared region data structure
 * @af: auto focus data
 * @debugfs_entry: debugfs entry for the firmware log
 */
struct fimc_is {};

static inline struct fimc_is *fimc_isp_to_is(struct fimc_isp *isp)
{}

static inline struct chain_config *__get_curr_is_config(struct fimc_is *is)
{}

static inline void fimc_is_mem_barrier(void)
{}

static inline void fimc_is_set_param_bit(struct fimc_is *is, int num)
{}

static inline void fimc_is_set_param_ctrl_cmd(struct fimc_is *is, int cmd)
{}

static inline void mcuctl_write(u32 v, struct fimc_is *is, unsigned int offset)
{}

static inline u32 mcuctl_read(struct fimc_is *is, unsigned int offset)
{}

static inline void pmuisp_write(u32 v, struct fimc_is *is, unsigned int offset)
{}

static inline u32 pmuisp_read(struct fimc_is *is, unsigned int offset)
{}

int fimc_is_wait_event(struct fimc_is *is, unsigned long bit,
		       unsigned int state, unsigned int timeout);
int fimc_is_cpu_set_power(struct fimc_is *is, int on);
int fimc_is_start_firmware(struct fimc_is *is);
int fimc_is_hw_initialize(struct fimc_is *is);
void fimc_is_log_dump(const char *level, const void *buf, size_t len);

#endif /* FIMC_IS_H_ */