linux/drivers/staging/media/atomisp/pci/atomisp_internal.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Support for Medifield PNW Camera Imaging ISP subsystem.
 *
 * Copyright (c) 2010 Intel Corporation. All Rights Reserved.
 *
 * Copyright (c) 2010 Silicon Hive www.siliconhive.com.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version
 * 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 *
 */
#ifndef __ATOMISP_INTERNAL_H__
#define __ATOMISP_INTERNAL_H__

#include "../../include/linux/atomisp_platform.h"
#include <linux/firmware.h>
#include <linux/kernel.h>
#include <linux/pm_qos.h>
#include <linux/idr.h>

#include <media/media-device.h>
#include <media/v4l2-async.h>
#include <media/v4l2-subdev.h>

/* ISP2400*/
#include "ia_css_types.h"
#include "sh_css_legacy.h"

#include "atomisp_csi2.h"
#include "atomisp_subdev.h"
#include "atomisp_compat.h"

#include "gp_device.h"
#include "irq.h"
#include <linux/vmalloc.h>

#define V4L2_EVENT_FRAME_END

#define IS_HWREVISION(isp, rev)

#define ATOMISP_PCI_DEVICE_SOC_BYT
/* MRFLD with 0x1178: ISP freq can burst to 457MHz */
#define ATOMISP_PCI_DEVICE_SOC_MRFLD
/* MRFLD with 0x1179: max ISP freq limited to 400MHz */
#define ATOMISP_PCI_DEVICE_SOC_MRFLD_1179
/* MRFLD with 0x117a: max ISP freq is 400MHz and max freq at Vmin is 200MHz */
#define ATOMISP_PCI_DEVICE_SOC_MRFLD_117A
#define ATOMISP_PCI_DEVICE_SOC_ANN
#define ATOMISP_PCI_DEVICE_SOC_CHT

#define ATOMISP_PCI_REV_MRFLD_A0_MAX
#define ATOMISP_PCI_REV_BYT_A0_MAX

#define ATOM_ISP_STEP_WIDTH
#define ATOM_ISP_STEP_HEIGHT

#define ATOM_ISP_MIN_WIDTH
#define ATOM_ISP_MIN_HEIGHT
#define ATOM_ISP_MAX_WIDTH
#define ATOM_ISP_MAX_HEIGHT

/* sub-QCIF resolution */
#define ATOM_RESOLUTION_SUBQCIF_WIDTH
#define ATOM_RESOLUTION_SUBQCIF_HEIGHT

#define ATOM_ISP_I2C_BUS_1
#define ATOM_ISP_I2C_BUS_2

#define ATOM_ISP_POWER_DOWN
#define ATOM_ISP_POWER_UP

#define ATOM_ISP_MAX_INPUTS

#define ATOMISP_SC_TYPE_SIZE

#define ATOMISP_ISP_TIMEOUT_DURATION
#define ATOMISP_EXT_ISP_TIMEOUT_DURATION
#define ATOMISP_WDT_KEEP_CURRENT_DELAY
#define ATOMISP_ISP_MAX_TIMEOUT_COUNT
#define ATOMISP_CSS_STOP_TIMEOUT_US

#define ATOMISP_CSS_Q_DEPTH
#define ATOMISP_CSS_EVENTS_MAX
#define ATOMISP_CONT_RAW_FRAMES
#define ATOMISP_METADATA_QUEUE_DEPTH_FOR_HAL
#define ATOMISP_S3A_BUF_QUEUE_DEPTH_FOR_HAL

/*
 * Define how fast CPU should be able to serve ISP interrupts.
 * The bigger the value, the higher risk that the ISP is not
 * triggered sufficiently fast for it to process image during
 * vertical blanking time, increasing risk of dropped frames.
 * 1000 us is a reasonable value considering that the processing
 * time is typically ~2000 us.
 */
#define ATOMISP_MAX_ISR_LATENCY

/* Add new YUVPP pipe for SOC sensor. */
#define ATOMISP_CSS_SUPPORT_YUVPP

#define ATOMISP_CSS_OUTPUT_SECOND_INDEX
#define ATOMISP_CSS_OUTPUT_DEFAULT_INDEX

/* ISP2401 */
#define ATOMISP_ION_DEVICE_FD_OFFSET
#define ATOMISP_ION_SHARED_FD_MASK
#define ATOMISP_ION_DEVICE_FD_MASK
#define ION_FD_UNSET

#define DIV_NEAREST_STEP(n, d, step)

struct atomisp_input_subdev {};

enum atomisp_dfs_mode {};

struct atomisp_regs {};

/*
 * ci device struct
 */
struct atomisp_device {};

#define v4l2_dev_to_atomisp_device(dev)

extern struct device *atomisp_dev;

#endif /* __ATOMISP_INTERNAL_H__ */