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