linux/drivers/staging/media/atomisp/pci/hive_isp_css_common/input_formatter_global.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 __INPUT_FORMATTER_GLOBAL_H_INCLUDED__
#define __INPUT_FORMATTER_GLOBAL_H_INCLUDED__

#define IS_INPUT_FORMATTER_VERSION2
#define IS_INPUT_SWITCH_VERSION2

#include <type_support.h>
#include <system_local.h>
#include "if_defs.h"
#include "str2mem_defs.h"
#include "input_switch_2400_defs.h"

#define _HIVE_INPUT_SWITCH_GET_FSYNC_REG_LSB(ch_id)

#define HIVE_SWITCH_N_CHANNELS
#define HIVE_SWITCH_N_FORMATTYPES
#define HIVE_SWITCH_N_SWITCH_CODE
#define HIVE_SWITCH_M_CHANNELS
#define HIVE_SWITCH_M_FORMATTYPES
#define HIVE_SWITCH_M_SWITCH_CODE
#define HIVE_SWITCH_M_FSYNC

#define HIVE_SWITCH_ENCODE_FSYNC(x)

#define _HIVE_INPUT_SWITCH_GET_LUT_FIELD(reg, bit_index)
#define _HIVE_INPUT_SWITCH_SET_LUT_FIELD(reg, bit_index, val)
#define _HIVE_INPUT_SWITCH_GET_FSYNC_FIELD(reg, bit_index)
#define _HIVE_INPUT_SWITCH_SET_FSYNC_FIELD(reg, bit_index, val)

input_formatter_cfg_t;

/* Hardware registers */
/*#define HIVE_IF_RESET_ADDRESS                   0x000*/ /* deprecated */
#define HIVE_IF_START_LINE_ADDRESS
#define HIVE_IF_START_COLUMN_ADDRESS
#define HIVE_IF_CROPPED_HEIGHT_ADDRESS
#define HIVE_IF_CROPPED_WIDTH_ADDRESS
#define HIVE_IF_VERTICAL_DECIMATION_ADDRESS
#define HIVE_IF_HORIZONTAL_DECIMATION_ADDRESS
#define HIVE_IF_H_DEINTERLEAVING_ADDRESS
#define HIVE_IF_LEFTPADDING_WIDTH_ADDRESS
#define HIVE_IF_END_OF_LINE_OFFSET_ADDRESS
#define HIVE_IF_VMEM_START_ADDRESS_ADDRESS
#define HIVE_IF_VMEM_END_ADDRESS_ADDRESS
#define HIVE_IF_VMEM_INCREMENT_ADDRESS
#define HIVE_IF_YUV_420_FORMAT_ADDRESS
#define HIVE_IF_VSYNCK_ACTIVE_LOW_ADDRESS
#define HIVE_IF_HSYNCK_ACTIVE_LOW_ADDRESS
#define HIVE_IF_ALLOW_FIFO_OVERFLOW_ADDRESS
#define HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS
#define HIVE_IF_V_DEINTERLEAVING_ADDRESS
#define HIVE_IF_FSM_CROP_PIXEL_COUNTER
#define HIVE_IF_FSM_CROP_LINE_COUNTER
#define HIVE_IF_FSM_CROP_STATUS

/* Registers only for simulation */
#define HIVE_IF_CRUN_MODE_ADDRESS
#define HIVE_IF_DUMP_OUTPUT_ADDRESS

/* Follow the DMA syntax, "cmd" last */
#define IF_PACK(val, cmd)

#define HIVE_STR2MEM_SOFT_RESET_REG_ADDRESS
#define HIVE_STR2MEM_INPUT_ENDIANNESS_REG_ADDRESS
#define HIVE_STR2MEM_OUTPUT_ENDIANNESS_REG_ADDRESS
#define HIVE_STR2MEM_BIT_SWAPPING_REG_ADDRESS
#define HIVE_STR2MEM_BLOCK_SYNC_LEVEL_REG_ADDRESS
#define HIVE_STR2MEM_PACKET_SYNC_LEVEL_REG_ADDRESS
#define HIVE_STR2MEM_READ_POST_WRITE_SYNC_ENABLE_REG_ADDRESS
#define HIVE_STR2MEM_DUAL_BYTE_INPUTS_ENABLED_REG_ADDRESS
#define HIVE_STR2MEM_EN_STAT_UPDATE_ADDRESS

/*
 * This data structure is shared between host and SP
 */
struct input_formatter_cfg_s {};

extern const hrt_address HIVE_IF_SRST_ADDRESS[N_INPUT_FORMATTER_ID];
extern const hrt_data HIVE_IF_SRST_MASK[N_INPUT_FORMATTER_ID];
extern const u8 HIVE_IF_SWITCH_CODE[N_INPUT_FORMATTER_ID];

#endif /* __INPUT_FORMATTER_GLOBAL_H_INCLUDED__ */