/* SPDX-License-Identifier: GPL-2.0 */ // SPDX-License-Identifier: GPL-2.0-or-later /* * (c) 2020 Mauro Carvalho Chehab <[email protected]> */ #ifndef __SYSTEM_GLOBAL_H_INCLUDED__ #define __SYSTEM_GLOBAL_H_INCLUDED__ /* * Create a list of HAS and IS properties that defines the system * Those are common for both ISP2400 and ISP2401 * * The configuration assumes the following * - The system is hetereogeneous; Multiple cells and devices classes * - The cell and device instances are homogeneous, each device type * belongs to the same class * - Device instances supporting a subset of the class capabilities are * allowed * * We could manage different device classes through the enumerated * lists (C) or the use of classes (C++), but that is presently not * fully supported * * N.B. the 3 input formatters are of 2 different classess */ #define DMA_DDR_TO_VAMEM_WORKAROUND #define DMA_DDR_TO_HMEM_WORKAROUND /* * The longest allowed (uninteruptible) bus transfer, does not * take stalling into account */ #define HIVE_ISP_MAX_BURST_LENGTH … /* * Maximum allowed burst length in words for the ISP DMA * This value is set to 2 to prevent the ISP DMA from blocking * the bus for too long; as the input system can only buffer * 2 lines on Moorefield and Cherrytrail, the input system buffers * may overflow if blocked for too long (BZ 2726). */ #define ISP2400_DMA_MAX_BURST_LENGTH … #define ISP2401_DMA_MAX_BURST_LENGTH … #include <hive_isp_css_defs.h> #include <type_support.h> /* This interface is deprecated */ #include "hive_types.h" /* * Semi global. "HRT" is accessible from SP, but the HRT types do not fully apply */ #define HRT_VADDRESS_WIDTH … #define SIZEOF_HRT_REG … #define HIVE_ISP_CTRL_DATA_BYTES … /* The main bus connecting all devices */ #define HRT_BUS_WIDTH … #define HRT_BUS_BYTES … hrt_bus_align_t; /* * Enumerate the devices, device access through the API is by ID, * through the DLI by address. The enumerator terminators are used * to size the wiring arrays and as an exception value. */ ddr_ID_t; isp_ID_t; sp_ID_t; mmu_ID_t; dma_ID_t; gdc_ID_t; /* this extra define is needed because we want to use it also in the preprocessor, and that doesn't work with enums. */ #define N_GDC_ID_CPP … vamem_ID_t; bamem_ID_t; hmem_ID_t; irq_ID_t; fifo_monitor_ID_t; gp_device_ID_t; gp_timer_ID_t; gpio_ID_t; timed_ctrl_ID_t; input_formatter_ID_t; /* The IF RST is outside the IF */ #define INPUT_FORMATTER0_SRST_OFFSET … #define INPUT_FORMATTER1_SRST_OFFSET … #define INPUT_FORMATTER2_SRST_OFFSET … #define INPUT_FORMATTER3_SRST_OFFSET … #define INPUT_FORMATTER0_SRST_MASK … #define INPUT_FORMATTER1_SRST_MASK … #define INPUT_FORMATTER2_SRST_MASK … #define INPUT_FORMATTER3_SRST_MASK … input_system_ID_t; rx_ID_t; enum mipi_port_id { … }; #define N_RX_CHANNEL_ID … sub_system_ID_t; #define N_CAPTURE_UNIT_ID … #define N_ACQUISITION_UNIT_ID … #define N_CTRL_UNIT_ID … enum ia_css_isp_memories { … }; #define IA_CSS_NUM_MEMORIES … /* For driver compatibility */ #define N_IA_CSS_ISP_MEMORIES … #define IA_CSS_NUM_ISP_MEMORIES … /* * ISP2401 specific enums */ isys_irq_ID_t; /* * Input-buffer Controller. */ ibuf_ctrl_ID_t; /* end of Input-buffer Controller */ /* * Stream2MMIO. */ stream2mmio_ID_t; stream2mmio_sid_ID_t; /* end of Stream2MMIO */ /** * Input System 2401: CSI-MIPI recevier. */ csi_rx_backend_ID_t; csi_rx_frontend_ID_t; csi_rx_fe_dlane_ID_t; /* end of CSI-MIPI receiver */ isys2401_dma_ID_t; /** * Pixel-generator. ("system_global.h") */ pixelgen_ID_t; /* end of pixel-generator. ("system_global.h") */ input_system_input_port_ID_t; #define N_INPUT_SYSTEM_CSI_PORT … isys2401_dma_channel; #endif /* __SYSTEM_GLOBAL_H_INCLUDED__ */