1 /* 2 * Support for Intel Camera Imaging ISP subsystem. 3 * Copyright (c) 2015, Intel Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms and conditions of the GNU General Public License, 7 * version 2, as published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 */ 14 15 #ifndef __ISYS_DMA_GLOBAL_H_INCLUDED__ 16 #define __ISYS_DMA_GLOBAL_H_INCLUDED__ 17 18 #include <type_support.h> 19 20 #define HIVE_ISYS2401_DMA_IBUF_DDR_CONN 0 21 #define HIVE_ISYS2401_DMA_IBUF_VMEM_CONN 1 22 #define _DMA_V2_ZERO_EXTEND 0 23 #define _DMA_V2_SIGN_EXTEND 1 24 25 #define _DMA_ZERO_EXTEND _DMA_V2_ZERO_EXTEND 26 #define _DMA_SIGN_EXTEND _DMA_V2_SIGN_EXTEND 27 28 /******************************************************** 29 * 30 * DMA Port. 31 * 32 * The DMA port definition for the input system 33 * 2401 DMA is the duplication of the DMA port 34 * definition for the CSS system DMA. It is duplicated 35 * here just as the temporal step before the device library 36 * is available. The device library is suppose to provide 37 * the capability of reusing the control interface of the 38 * same device prototypes. The refactor team will work on 39 * this, right? 40 * 41 ********************************************************/ 42 typedef struct isys2401_dma_port_cfg_s isys2401_dma_port_cfg_t; 43 struct isys2401_dma_port_cfg_s { 44 u32 stride; 45 u32 elements; 46 u32 cropping; 47 u32 width; 48 }; 49 50 /* end of DMA Port */ 51 52 /************************************************ 53 * 54 * DMA Device. 55 * 56 * The DMA device definition for the input system 57 * 2401 DMA is the duplicattion of the DMA device 58 * definition for the CSS system DMA. It is duplicated 59 * here just as the temporal step before the device library 60 * is available. The device library is suppose to provide 61 * the capability of reusing the control interface of the 62 * same device prototypes. The refactor team will work on 63 * this, right? 64 * 65 ************************************************/ 66 typedef enum { 67 isys2401_dma_ibuf_to_ddr_connection = HIVE_ISYS2401_DMA_IBUF_DDR_CONN, 68 isys2401_dma_ibuf_to_vmem_connection = HIVE_ISYS2401_DMA_IBUF_VMEM_CONN 69 } isys2401_dma_connection; 70 71 typedef enum { 72 isys2401_dma_zero_extension = _DMA_ZERO_EXTEND, 73 isys2401_dma_sign_extension = _DMA_SIGN_EXTEND 74 } isys2401_dma_extension; 75 76 typedef struct isys2401_dma_cfg_s isys2401_dma_cfg_t; 77 struct isys2401_dma_cfg_s { 78 isys2401_dma_channel channel; 79 isys2401_dma_connection connection; 80 isys2401_dma_extension extension; 81 u32 height; 82 }; 83 84 /* end of DMA Device */ 85 86 /* isys2401_dma_channel limits per DMA ID */ 87 extern const isys2401_dma_channel 88 N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID]; 89 90 #endif /* __ISYS_DMA_GLOBAL_H_INCLUDED__ */ 91