GNU Linux-libre 4.9.309-gnu1
[releases.git] / drivers / staging / most / hdm-dim2 / dim2_errors.h
1 /*
2  * dim2_errors.h - Definitions of errors for DIM2 HAL API
3  * (MediaLB, Device Interface Macro IP, OS62420)
4  *
5  * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * This file is licensed under GPLv2.
13  */
14
15 #ifndef _MOST_DIM_ERRORS_H
16 #define _MOST_DIM_ERRORS_H
17
18 /**
19  * MOST DIM errors.
20  */
21 enum dim_errors_t {
22         /** Not an error */
23         DIM_NO_ERROR = 0,
24
25         /** Bad base address for DIM2 IP */
26         DIM_INIT_ERR_DIM_ADDR = 0x10,
27
28         /**< Bad MediaLB clock */
29         DIM_INIT_ERR_MLB_CLOCK,
30
31         /** Bad channel address */
32         DIM_INIT_ERR_CHANNEL_ADDRESS,
33
34         /** Out of DBR memory */
35         DIM_INIT_ERR_OUT_OF_MEMORY,
36
37         /** DIM API is called while DIM is not initialized successfully */
38         DIM_ERR_DRIVER_NOT_INITIALIZED = 0x20,
39
40         /**
41          * Configuration does not respect hardware limitations
42          * for isochronous or synchronous channels
43          */
44         DIM_ERR_BAD_CONFIG,
45
46         /**
47          * Buffer size does not respect hardware limitations
48          * for isochronous or synchronous channels
49          */
50         DIM_ERR_BAD_BUFFER_SIZE,
51
52         DIM_ERR_UNDERFLOW,
53
54         DIM_ERR_OVERFLOW,
55 };
56
57 #endif /* _MOST_DIM_ERRORS_H */