1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 #ifndef __ISYS_DMA_GLOBAL_H_INCLUDED__ 8 #define __ISYS_DMA_GLOBAL_H_INCLUDED__ 9 10 #include <type_support.h> 11 12 #define HIVE_ISYS2401_DMA_IBUF_DDR_CONN 0 13 #define HIVE_ISYS2401_DMA_IBUF_VMEM_CONN 1 14 #define _DMA_V2_ZERO_EXTEND 0 15 #define _DMA_V2_SIGN_EXTEND 1 16 17 #define _DMA_ZERO_EXTEND _DMA_V2_ZERO_EXTEND 18 #define _DMA_SIGN_EXTEND _DMA_V2_SIGN_EXTEND 19 20 /******************************************************** 21 * 22 * DMA Port. 23 * 24 * The DMA port definition for the input system 25 * 2401 DMA is the duplication of the DMA port 26 * definition for the CSS system DMA. It is duplicated 27 * here just as the temporal step before the device library 28 * is available. The device library is suppose to provide 29 * the capability of reusing the control interface of the 30 * same device prototypes. The refactor team will work on 31 * this, right? 32 * 33 ********************************************************/ 34 typedef struct isys2401_dma_port_cfg_s isys2401_dma_port_cfg_t; 35 struct isys2401_dma_port_cfg_s { 36 u32 stride; 37 u32 elements; 38 u32 cropping; 39 u32 width; 40 }; 41 42 /* end of DMA Port */ 43 44 /************************************************ 45 * 46 * DMA Device. 47 * 48 * The DMA device definition for the input system 49 * 2401 DMA is the duplicattion of the DMA device 50 * definition for the CSS system DMA. It is duplicated 51 * here just as the temporal step before the device library 52 * is available. The device library is suppose to provide 53 * the capability of reusing the control interface of the 54 * same device prototypes. The refactor team will work on 55 * this, right? 56 * 57 ************************************************/ 58 typedef enum { 59 isys2401_dma_ibuf_to_ddr_connection = HIVE_ISYS2401_DMA_IBUF_DDR_CONN, 60 isys2401_dma_ibuf_to_vmem_connection = HIVE_ISYS2401_DMA_IBUF_VMEM_CONN 61 } isys2401_dma_connection; 62 63 typedef enum { 64 isys2401_dma_zero_extension = _DMA_ZERO_EXTEND, 65 isys2401_dma_sign_extension = _DMA_SIGN_EXTEND 66 } isys2401_dma_extension; 67 68 typedef struct isys2401_dma_cfg_s isys2401_dma_cfg_t; 69 struct isys2401_dma_cfg_s { 70 isys2401_dma_channel channel; 71 isys2401_dma_connection connection; 72 isys2401_dma_extension extension; 73 u32 height; 74 }; 75 76 /* end of DMA Device */ 77 78 /* isys2401_dma_channel limits per DMA ID */ 79 extern const isys2401_dma_channel 80 N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID]; 81 82 #endif /* __ISYS_DMA_GLOBAL_H_INCLUDED__ */ 83