Linux-libre 4.17.3-gnu
[librecmc/linux-libre.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / runtime / queue / interface / ia_css_queue_comm.h
1 #ifndef ISP2401
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 #else
16 /**
17 Support for Intel Camera Imaging ISP subsystem.
18 Copyright (c) 2010 - 2015, Intel Corporation.
19
20 This program is free software; you can redistribute it and/or modify it
21 under the terms and conditions of the GNU General Public License,
22 version 2, as published by the Free Software Foundation.
23
24 This program is distributed in the hope it will be useful, but WITHOUT
25 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
27 more details.
28 */
29 #endif
30
31 #ifndef __IA_CSS_QUEUE_COMM_H
32 #define __IA_CSS_QUEUE_COMM_H
33
34 #include "type_support.h"
35 #include "ia_css_circbuf.h"
36 /*****************************************************************************
37  * Queue Public Data Structures
38  *****************************************************************************/
39
40 /* Queue location specifier */
41 /* Avoiding enums to save space */
42 #define IA_CSS_QUEUE_LOC_HOST 0
43 #define IA_CSS_QUEUE_LOC_SP   1
44 #define IA_CSS_QUEUE_LOC_ISP  2
45
46 /* Queue type specifier */
47 /* Avoiding enums to save space */
48 #define IA_CSS_QUEUE_TYPE_LOCAL  0
49 #define IA_CSS_QUEUE_TYPE_REMOTE 1
50
51 /* for DDR Allocated queues,
52 allocate minimum these many elements.
53 DDR->SP' DMEM DMA transfer needs 32byte aligned address.
54 Since each element size is 4 bytes, 8 elements need to be
55 DMAed to access single element.*/
56 #define IA_CSS_MIN_ELEM_COUNT    8
57 #define IA_CSS_DMA_XFER_MASK (IA_CSS_MIN_ELEM_COUNT - 1)
58
59 /* Remote Queue object descriptor */
60 struct ia_css_queue_remote {
61         uint32_t cb_desc_addr; /*Circbuf desc address for remote queues*/
62         uint32_t cb_elems_addr; /*Circbuf elements addr for remote queue*/
63         uint8_t location;    /* Cell location for queue */
64         uint8_t proc_id;     /* Processor id for queue access */
65 };
66 typedef struct ia_css_queue_remote ia_css_queue_remote_t;
67
68
69 #endif /* __IA_CSS_QUEUE_COMM_H */