tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8810 / sc8810_dma_cfg.h
1 /*******************************************************************************
2  ** File Name:      sc8810_dma_cfg.h                                          *
3  ** Author:         andy.chen                                                  *
4  ** Date:           08/23/2010                                                 *
5  ** Copyright:      Copyright 2001-xxxx by Spreadtrum Communications,Inc.      *
6  *                  All Rights Reserved.                                       *
7  **                 This software is supplied under the terms of a license     *
8  **                 agreement or non-disclosure agreement with Spreadtrum.     *
9  **                 Passing on and copying of this document,and communication  *
10  **                 of its contents is not permitted without prior written     *
11  **                 authorization.                                             *
12  ** Description:    This is the header file of defines signals of the sim      *
13  **                 application layer                                          *
14  *******************************************************************************
15
16  *******************************************************************************
17  **                        Edit History                                        *
18  ** ---------------------------------------------------------------------------*
19  ** Date           Name             Description                                *
20  **----------------------------------------------------------------------------*
21  ** 2010.08        andy.chen         Create                                    *
22  ** 20xx.xx        xxxx.xxxx         update                                    *
23  ******************************************************************************/
24
25
26 #ifndef __SC8810_DMA_CFG_H__
27 #define __SC8810_DMA_CFG_H__
28
29 /*******************************************************************************
30  **                        Dependencies                                        *
31  ******************************************************************************/
32 #include "sci_types.h"
33 #include "os_api.h"
34 #include "chip_plf_export.h"
35
36 /*******************************************************************************
37  **                        Compiler Flag                                       *
38  ******************************************************************************/
39
40 #ifdef   __cplusplus
41 extern   "C"
42 {
43 #endif
44
45 /*******************************************************************************
46  **                        Mcaro Definitions                                   *
47  ******************************************************************************/
48 // DMA MAX CH NUMBER
49 #define DMA_CH_NUM                      32
50 #define DMA_SOFT_BLOCK_WAITTIME         (0x0f)
51 #define DMA_HARD_BLOCK_WAITTIME         (0x0f)
52 #define DMA_MAX_TRANSSIZE               (1<<25)    //2^25byte
53 #define DMA_MAX_BURSTSIZE               (1<<16)    //2^16byte
54
55 // DMA user id
56 #define DMA_SOFT0                       0x00
57 #define DMA_UART0_TX                    0x01
58 #define DMA_UART0_RX                    0x02
59 #define DMA_UART1_TX                    0x03
60 #define DMA_UART1_RX                    0x04
61 #define DMA_UART2_TX                    0x05
62 #define DMA_UART2_RX                    0x06
63 #define DMA_IIS_TX                      0x07
64 #define DMA_IIS_RX                      0x08
65 #define DMA_EPT_IN                      0x09
66 #define DMA_EPT_OUT                     0x0A
67 #define DMA_VB_DA0                      0x0B
68 #define DMA_VB_DA1                      0x0C
69 #define DMA_VB_AD0                      0x0D
70 #define DMA_VB_AD1                      0x0E
71 #define DMA_SIM0_TX                     0x0F
72 #define DMA_SIM0_RX                     0x10
73 #define DMA_SIM1_TX                     0x11
74 #define DMA_SIM1_RX                     0x12
75 #define DMA_SPI_TX                                              0x13
76 #define DMA_SPI_RX                                              0x14
77 #define DMA_ROT                         0x15
78 #define DMA_DRM_RAW                                             0x1D
79 #define DMA_DRM_CPT                                             0x1E
80 #define DMA_VB_AD                       DMA_VB_AD0
81 #define DMA_USB_EP1                                             DMA_SOFT0
82 #define DMA_USB_EP3                                             DMA_SOFT0
83
84
85 // endian issue
86 #define DMA_ENDIAN_SELECT               DMA_CFG_Endian()
87 /*******************************************************************************
88  **                        Structures Definitions                              *
89  ******************************************************************************/
90 //dma channel type
91 typedef enum _DMA_CHN_TYPE
92 {
93     DMA_CHN_TYPE_HARD = 0,
94     DMA_CHN_TYPE_SOFT,
95     DMA_CHN_TYPE_MAX
96 }
97 DMA_CHN_TYPE_E;
98
99 /*******************************************************************************
100  **                        data prototype                                      *
101  ******************************************************************************/
102
103 /*******************************************************************************
104  **                        Function prototype                                  *
105  ******************************************************************************/
106 /******************************************************************************/
107 //  Description:    get dma channel type
108 //  Global resource dependence:
109 //  Author:         andy.chen
110 //  Note:           channel:dma channel number,0-31
111 //  Return value:   DMA_CHN_TYPE_HARD/DMA_CHN_TYPE_SOFT
112 /******************************************************************************/
113 PUBLIC DMA_CHN_TYPE_E DMA_CFG_GetChnType (uint32 channel);
114
115 /******************************************************************************/
116 //  Description:    dma endian select
117 //  Global resource dependence:
118 //  Author:         andy.chen
119 //  Note:
120 //  Return value:
121 /******************************************************************************/
122 PUBLIC void DMA_CFG_Endian (void);
123
124 /*******************************************************************************
125  **                        Compiler Flag                                       *
126  ******************************************************************************/
127 #ifdef   __cplusplus
128 }
129 #endif
130 /**---------------------------------------------------------------------------*/
131 #endif  //__SC8810_DMA_CFG_H__
132 // End
133
134