]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - pdk_k2g_1_0_1_0_eng/packages/ti/csl/csl_xmc.h
Add alpha files for car
[processor-sdk/performance-audio-sr.git] / pdk_k2g_1_0_1_0_eng / packages / ti / csl / csl_xmc.h
1 /*  ============================================================================
2  *   Copyright (c) Texas Instruments Incorporated 2008, 2009
3  * 
4  *  Redistribution and use in source and binary forms, with or without 
5  *  modification, are permitted provided that the following conditions 
6  *  are met:
7  *
8  *    Redistributions of source code must retain the above copyright 
9  *    notice, this list of conditions and the following disclaimer.
10  *
11  *    Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the 
13  *    documentation and/or other materials provided with the   
14  *    distribution.
15  *
16  *    Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
21  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
22  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
24  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
25  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
26  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
29  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
30  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32 */
34 /** 
35  *   @file  csl_xmc.h
36  *
37  *   @brief  
38  *      XMC CSL Implementation on DSP side
39  *
40  *  \par
41  *  ============================================================================
42  *  @n   (C) Copyright 2008, 2009, Texas Instruments, Inc.
43  *  @n   Use of this software is controlled by the terms and conditions found 
44  *  @n   in the license agreement under which this software has been supplied.
45  *  ===========================================================================
46  *  \par  
47  */
49 /** @defgroup CSL_XMC_API XMC
50  *
51  * @section Introduction
52  *
53  * @subsection xxx Overview
54  *
55  * The XMC takes on the following roles:
56  *              a) UMC to VBusM conversion
57  *              b) Shared memory access path
58  *              c) Prefetch support
59  *              d) Address extension/translation
60  *              e) Memory protection for addresses outside CGEM eg. MSMC RAM or EMIF
61  *
62  * @subsection References
63  *   -# XMC User's Guide
64  *
65  * @subsection Assumptions
66  *    The abbreviations XMC, xmc and Xmc have been used throughout this
67  *    document to refer to CGEM eXtended Memory Controller
68  */
70 #ifndef CSL_XMC_H
71 #define CSL_XMC_H
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
77 #include <ti/csl/soc.h>
78 #include <ti/csl/csl.h>
79 #include <ti/csl/cslr_xmc.h>
81 /**
82 @defgroup CSL_XMC_SYMBOL  XMC Symbols Defined
83 @ingroup CSL_XMC_API
84 */
85 /**
86 @defgroup CSL_XMC_DATASTRUCT  XMC Data Structures
87 @ingroup CSL_XMC_API
88 */
89 /**
90 @defgroup CSL_XMC_FUNCTION  XMC Functions
91 @ingroup CSL_XMC_API
92 */
94 /** @addtogroup CSL_XMC_DATASTRUCT
95  @{ */
97 /** @brief This is the definition of CSL_XMC_XMPAXH */
98 typedef struct CSL_XMC_XMPAXH
99 {
100         /** Base Address */     
101         Uint32 bAddr;
102         
103         /** Encoded Segment Size */     
104         Uint8 segSize;
105 }CSL_XMC_XMPAXH;
107 /** @brief This is the definition of CSL_XMC_XMPAXL */
108 typedef struct CSL_XMC_XMPAXL 
110         /** Replacement Address */
111         Uint32 rAddr;
112         
113         /** When set, supervisor may read from segment */       
114         Uint32 sr;
116         /** When set, supervisor may write to segment */        
117         Uint32 sw;
118         
119         /** When set, supervisor may execute from segment */    
120         Uint32 sx;
121         
122         /** When set, user may read from segment */     
123         Uint32 ur;
125         /** When set, user may write to segment */      
126         Uint32 uw;
128         /** When set, user may execute from segment */  
129         Uint32 ux;
130 }CSL_XMC_XMPAXL;
132 /** @brief This is the definition of CSL_XMC_MPFSR */
133 typedef struct CSL_XMC_MPFSR 
135         /** Local Access ? */   
136         Uint32 local;
137         
138         /** When set, indicates a Supervisor Read Request */
139         Uint32 sr;
140         
141         /** When set, indicates a Supervisor Write Request */   
142         Uint32 sw;
143         
144         /** When set, indicates a Supervisor program fetch Request */   
145         Uint32 sx;
146         
147         /** When set, indicates a User Read Request */  
148         Uint32 ur;
149         
150         /** When set, indicates a User Write Request */ 
151         Uint32 uw;
153         /** When set, indicates a User program fetch Request */ 
154         Uint32 ux;                      
155 }CSL_XMC_MPFSR;
157 /** @brief This is the definition of CSL_XMC_XPFADDR */
158 typedef struct CSL_XMC_XPFADDR 
160         /** Stream address (128-bit aligned) */ 
161         Uint32 addr;
163         /** Sign bit of stream direction (0=fwd, 1=rev) */      
164         Uint32 dir;
165         
166         /** Data pending for upper ("high") half */     
167         Uint32 dph;
168         
169         /** Data valid for upper half */        
170         Uint32 dvh;
171         
172         /** Address valid for upper half */     
173         Uint32 avh;
174         
175         /** Data pending for lower half */      
176         Uint32 dpl;
177         
178         /** Data valid for lower half */        
179         Uint32 dvl;
180         
181         /** Address valid for lower half */     
182         Uint32 avl;
183 }CSL_XMC_XPFADDR;
185 /** @brief This is the definition of CSL_XMC_ACEN_MODE */
186 typedef enum {
187     /** Disable analysis counters. */        
188     CSL_XMC_ACEN_MODE_COUNT_DISABLE = 0,
189     /** Count Program events only. */        
190     CSL_XMC_ACEN_MODE_COUNT_PROGEVENTS = 1,
191     /** Count Data events only. */        
192     CSL_XMC_ACEN_MODE_COUNT_DATAEVENTS = 2,
193     /** Count both program and data events. */        
194     CSL_XMC_ACEN_MODE_COUNT_ALL = 3
195 }CSL_XMC_ACEN_MODE;
196         
197 /**
198  *  Handle to access XMC registers accessible through config bus.
199  */
200 #ifndef CSL_XMC_CFG_REGS
201  #if defined(SOC_C6678)||defined(SOC_C6657)
202   #define CSL_XMC_CFG_REGS CSL_XMC_CONFIG_REGS 
203  #else
204   #define CSL_XMC_CFG_REGS CSL_DSP_DSP_XMC_CTRL_REGS 
205  #endif
206 #endif
208 #define hXmc     ((CSL_XmcRegs*)CSL_XMC_CFG_REGS)
210 /**
211 @}
212 */
215 #ifdef __cplusplus
217 #endif
218 #endif /* CSL_XMC_H */