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 libary 36 * is available. The device libary 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 ********************************************************/ 42typedef struct isys2401_dma_port_cfg_s isys2401_dma_port_cfg_t; 43struct isys2401_dma_port_cfg_s { 44 uint32_t stride; 45 uint32_t elements; 46 uint32_t cropping; 47 uint32_t width; 48 }; 49/* end of DMA Port */ 50 51/************************************************ 52 * 53 * DMA Device. 54 * 55 * The DMA device definition for the input system 56 * 2401 DMA is the duplicattion of the DMA device 57 * definition for the CSS system DMA. It is duplicated 58 * here just as the temporal step before the device libary 59 * is available. The device libary is suppose to provide 60 * the capability of reusing the control interface of the 61 * same device prototypes. The refactor team will work on 62 * this, right? 63 * 64 ************************************************/ 65typedef enum { 66 isys2401_dma_ibuf_to_ddr_connection = HIVE_ISYS2401_DMA_IBUF_DDR_CONN, 67 isys2401_dma_ibuf_to_vmem_connection = HIVE_ISYS2401_DMA_IBUF_VMEM_CONN 68} isys2401_dma_connection; 69 70typedef enum { 71 isys2401_dma_zero_extension = _DMA_ZERO_EXTEND, 72 isys2401_dma_sign_extension = _DMA_SIGN_EXTEND 73} isys2401_dma_extension; 74 75typedef struct isys2401_dma_cfg_s isys2401_dma_cfg_t; 76struct isys2401_dma_cfg_s { 77 isys2401_dma_channel channel; 78 isys2401_dma_connection connection; 79 isys2401_dma_extension extension; 80 uint32_t height; 81}; 82/* end of DMA Device */ 83 84/* isys2401_dma_channel limits per DMA ID */ 85extern const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID]; 86 87#endif /* __ISYS_DMA_GLOBAL_H_INCLUDED__ */ 88