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

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Support for Intel Camera Imaging ISP subsystem.
 * Copyright (c) 2015, Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope 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 _isp_acquisition_defs_h
#define _isp_acquisition_defs_h

#define _ISP_ACQUISITION_REG_ALIGN
#define _ISP_ACQUISITION_BYTES_PER_ELEM

/* --------------------------------------------------*/

#define NOF_ACQ_IRQS

/* --------------------------------------------------*/
/* FSM */
/* --------------------------------------------------*/
#define MEM2STREAM_FSM_STATE_BITS
#define ACQ_SYNCHRONIZER_FSM_STATE_BITS

/* --------------------------------------------------*/
/* REGISTER INFO */
/* --------------------------------------------------*/

#define NOF_ACQ_REGS

// Register id's of MMIO slave accessible registers
#define ACQ_START_ADDR_REG_ID
#define ACQ_MEM_REGION_SIZE_REG_ID
#define ACQ_NUM_MEM_REGIONS_REG_ID
#define ACQ_INIT_REG_ID
#define ACQ_RECEIVED_SHORT_PACKETS_REG_ID
#define ACQ_RECEIVED_LONG_PACKETS_REG_ID
#define ACQ_LAST_COMMAND_REG_ID
#define ACQ_NEXT_COMMAND_REG_ID
#define ACQ_LAST_ACKNOWLEDGE_REG_ID
#define ACQ_NEXT_ACKNOWLEDGE_REG_ID
#define ACQ_FSM_STATE_INFO_REG_ID
#define ACQ_INT_CNTR_INFO_REG_ID

// Register width
#define ACQ_START_ADDR_REG_WIDTH
#define ACQ_MEM_REGION_SIZE_REG_WIDTH
#define ACQ_NUM_MEM_REGIONS_REG_WIDTH
#define ACQ_INIT_REG_WIDTH
#define ACQ_RECEIVED_SHORT_PACKETS_REG_WIDTH
#define ACQ_RECEIVED_LONG_PACKETS_REG_WIDTH
#define ACQ_LAST_COMMAND_REG_WIDTH
#define ACQ_NEXT_COMMAND_REG_WIDTH
#define ACQ_LAST_ACKNOWLEDGE_REG_WIDTH
#define ACQ_NEXT_ACKNOWLEDGE_REG_WIDTH
#define ACQ_FSM_STATE_INFO_REG_WIDTH
#define ACQ_INT_CNTR_INFO_REG_WIDTH

/* register reset value */
#define ACQ_START_ADDR_REG_RSTVAL
#define ACQ_MEM_REGION_SIZE_REG_RSTVAL
#define ACQ_NUM_MEM_REGIONS_REG_RSTVAL
#define ACQ_INIT_REG_RSTVAL
#define ACQ_RECEIVED_SHORT_PACKETS_REG_RSTVAL
#define ACQ_RECEIVED_LONG_PACKETS_REG_RSTVAL
#define ACQ_LAST_COMMAND_REG_RSTVAL
#define ACQ_NEXT_COMMAND_REG_RSTVAL
#define ACQ_LAST_ACKNOWLEDGE_REG_RSTVAL
#define ACQ_NEXT_ACKNOWLEDGE_REG_RSTVAL
#define ACQ_FSM_STATE_INFO_REG_RSTVAL
#define ACQ_INT_CNTR_INFO_REG_RSTVAL

/* bit definitions */
#define ACQ_INIT_RST_REG_BIT
#define ACQ_INIT_RESYNC_BIT
#define ACQ_INIT_RST_IDX
#define ACQ_INIT_RST_BITS
#define ACQ_INIT_RESYNC_IDX
#define ACQ_INIT_RESYNC_BITS

/* --------------------------------------------------*/
/* TOKEN INFO */
/* --------------------------------------------------*/
#define ACQ_TOKEN_ID_LSB
#define ACQ_TOKEN_ID_MSB
#define ACQ_TOKEN_WIDTH
#define ACQ_TOKEN_ID_IDX
#define ACQ_TOKEN_ID_BITS
#define ACQ_INIT_CMD_INIT_IDX
#define ACQ_INIT_CMD_INIT_BITS
#define ACQ_CMD_START_ADDR_IDX
#define ACQ_CMD_START_ADDR_BITS
#define ACQ_CMD_NOFWORDS_IDX
#define ACQ_CMD_NOFWORDS_BITS
#define ACQ_MEM_REGION_ID_IDX
#define ACQ_MEM_REGION_ID_BITS
#define ACQ_PACKET_LENGTH_TOKEN_MSB
#define ACQ_PACKET_LENGTH_TOKEN_LSB
#define ACQ_PACKET_DATA_FORMAT_ID_TOKEN_MSB
#define ACQ_PACKET_DATA_FORMAT_ID_TOKEN_LSB
#define ACQ_PACKET_CH_ID_TOKEN_MSB
#define ACQ_PACKET_CH_ID_TOKEN_LSB
#define ACQ_PACKET_MEM_REGION_ID_TOKEN_MSB
#define ACQ_PACKET_MEM_REGION_ID_TOKEN_LSB

/* Command tokens IDs */
#define ACQ_READ_REGION_AUTO_INCR_TOKEN_ID
#define ACQ_READ_REGION_TOKEN_ID
#define ACQ_READ_REGION_SOP_TOKEN_ID
#define ACQ_INIT_TOKEN_ID

/* Acknowledge token IDs */
#define ACQ_READ_REGION_ACK_TOKEN_ID
#define ACQ_END_OF_PACKET_TOKEN_ID
#define ACQ_END_OF_REGION_TOKEN_ID
#define ACQ_SOP_MISMATCH_TOKEN_ID
#define ACQ_UNDEF_PH_TOKEN_ID

#define ACQ_TOKEN_MEMREGIONID_MSB
#define ACQ_TOKEN_MEMREGIONID_LSB
#define ACQ_TOKEN_NOFWORDS_MSB
#define ACQ_TOKEN_NOFWORDS_LSB
#define ACQ_TOKEN_STARTADDR_MSB
#define ACQ_TOKEN_STARTADDR_LSB

/* --------------------------------------------------*/
/* MIPI */
/* --------------------------------------------------*/

#define WORD_COUNT_WIDTH
#define PKT_CODE_WIDTH
#define CHN_NO_WIDTH
#define ERROR_INFO_WIDTH

#define LONG_PKTCODE_MAX
#define LONG_PKTCODE_MIN
#define SHORT_PKTCODE_MAX

#define EOF_CODE

/* --------------------------------------------------*/
/* Packet Info */
/* --------------------------------------------------*/
#define ACQ_START_OF_FRAME
#define ACQ_END_OF_FRAME
#define ACQ_START_OF_LINE
#define ACQ_END_OF_LINE
#define ACQ_LINE_PAYLOAD
#define ACQ_GEN_SH_PKT

/* bit definition */
#define ACQ_PKT_TYPE_IDX
#define ACQ_PKT_TYPE_BITS
#define ACQ_PKT_SOP_IDX
#define ACQ_WORD_CNT_IDX
#define ACQ_WORD_CNT_BITS
#define ACQ_PKT_INFO_IDX
#define ACQ_PKT_INFO_BITS
#define ACQ_HEADER_DATA_IDX
#define ACQ_HEADER_DATA_BITS
#define ACQ_ACK_TOKEN_ID_IDX
#define ACQ_ACK_TOKEN_ID_BITS
#define ACQ_ACK_NOFWORDS_IDX
#define ACQ_ACK_NOFWORDS_BITS
#define ACQ_ACK_PKT_LEN_IDX
#define ACQ_ACK_PKT_LEN_BITS

/* --------------------------------------------------*/
/* Packet Data Type */
/* --------------------------------------------------*/

#define ACQ_YUV420_8_DATA
#define ACQ_YUV420_10_DATA
#define ACQ_YUV420_8L_DATA
#define ACQ_YUV422_8_DATA
#define ACQ_YUV422_10_DATA
#define ACQ_RGB444_DATA
#define ACQ_RGB555_DATA
#define ACQ_RGB565_DATA
#define ACQ_RGB666_DATA
#define ACQ_RGB888_DATA
#define ACQ_RAW6_DATA
#define ACQ_RAW7_DATA
#define ACQ_RAW8_DATA
#define ACQ_RAW10_DATA
#define ACQ_RAW12_DATA
#define ACQ_RAW14_DATA
#define ACQ_USR_DEF_1_DATA
#define ACQ_USR_DEF_2_DATA
#define ACQ_USR_DEF_3_DATA
#define ACQ_USR_DEF_4_DATA
#define ACQ_USR_DEF_5_DATA
#define ACQ_USR_DEF_6_DATA
#define ACQ_USR_DEF_7_DATA
#define ACQ_USR_DEF_8_DATA
#define ACQ_Emb_DATA
#define ACQ_SOF_DATA
#define ACQ_EOF_DATA
#define ACQ_SOL_DATA
#define ACQ_EOL_DATA
#define ACQ_GEN_SH1_DATA
#define ACQ_GEN_SH2_DATA
#define ACQ_GEN_SH3_DATA
#define ACQ_GEN_SH4_DATA
#define ACQ_GEN_SH5_DATA
#define ACQ_GEN_SH6_DATA
#define ACQ_GEN_SH7_DATA
#define ACQ_GEN_SH8_DATA
#define ACQ_YUV420_8_CSPS_DATA
#define ACQ_YUV420_10_CSPS_DATA
#define ACQ_RESERVED_DATA_TYPE_MIN
#define ACQ_RESERVED_DATA_TYPE_MAX
#define ACQ_GEN_LONG_RESERVED_DATA_TYPE_MIN
#define ACQ_GEN_LONG_RESERVED_DATA_TYPE_MAX
#define ACQ_YUV_RESERVED_DATA_TYPE
#define ACQ_RGB_RESERVED_DATA_TYPE_MIN
#define ACQ_RGB_RESERVED_DATA_TYPE_MAX
#define ACQ_RAW_RESERVED_DATA_TYPE_MIN
#define ACQ_RAW_RESERVED_DATA_TYPE_MAX

/* --------------------------------------------------*/

#endif /* _isp_acquisition_defs_h */