![]() |
![]() |
00001 00009 /* 00010 * ============================================================================ 00011 * 00012 * Copyright (c) 2008-2009, Texas Instruments Incorporated 00013 * 00014 * Redistribution and use in source and binary forms, with or without 00015 * modification, are permitted provided that the following conditions 00016 * are met: 00017 * 00018 * * Redistributions of source code must retain the above copyright 00019 * notice, this list of conditions and the following disclaimer. 00020 * 00021 * * Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in the 00023 * documentation and/or other materials provided with the distribution. 00024 * 00025 * * Neither the name of Texas Instruments Incorporated nor the names of 00026 * its contributors may be used to endorse or promote products derived 00027 * from this software without specific prior written permission. 00028 * 00029 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00030 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00031 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00032 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00033 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00034 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00035 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00036 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00037 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00038 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00039 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00040 * Contact information for paper mail: 00041 * Texas Instruments 00042 * Post Office Box 655303 00043 * Dallas, Texas 75265 00044 * Contact information: 00045 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? 00046 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact 00047 * ============================================================================ 00048 * 00049 */ 00050 00051 00052 00053 #ifndef _SysLink_H_ 00054 #define _SysLink_H_ 00055 00056 00057 #if defined (__cplusplus) 00058 extern "C" { 00059 #endif 00060 00061 /* ============================================================================= 00062 * macros & defines 00063 * ============================================================================= 00064 */ 00073 #define IPC_BUFFER_ALIGN(x, y) (UInt32)((UInt32)((x + y - 1) / y) * y) 00074 00075 00081 #define SYSLINK_MAX_MEMENTRIES 10 00082 00089 #define SYSLINK_MAX_NAMELENGTH 32 00090 00091 /* ============================================================================= 00092 * Structures & Enums 00093 * ============================================================================= 00094 */ 00095 00096 typedef UInt32 SysLink_MapMask; 00097 00101 #define SysLink_MASTERKNLVIRT (SysLink_MapMask)(1 << 0) 00102 00106 #define SysLink_MASTERUSRVIRT (SysLink_MapMask)(1 << 1) 00107 00111 #define SysLink_SLAVEVIRT (SysLink_MapMask)(1 << 2) 00112 00116 typedef enum SysLink_NotifyType_tag { 00117 SysLink_NOTIFICATION_NONE = 0, 00119 SysLink_NOTIFICATION_ALWAYS = 1, 00121 SysLink_NOTIFICATION_ONCE = 2, 00126 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS = 3, 00130 SysLink_NOTIFICATION_HDWRFIFO_ONCE = 4 00136 } SysLink_NotifyType; 00137 00141 typedef struct SysLink_MemEntry_tag { 00142 UInt32 slaveVirtAddr; 00143 UInt32 masterPhysAddr; 00144 UInt32 size; 00145 SysLink_MapMask mapMask; 00146 Bool map; 00149 Bool isCached; 00152 Bool isValid; 00153 } SysLink_MemEntry; 00154 00158 typedef struct SysLink_MemEntry_Block_tag { 00159 Char procName[SYSLINK_MAX_NAMELENGTH]; 00161 UInt32 numEntries; 00163 SysLink_MemEntry memEntries [SYSLINK_MAX_MEMENTRIES]; 00165 } SysLink_MemEntry_Block; 00166 00167 00171 typedef struct SysLink_MemoryMap_tag { 00172 UInt16 numBlocks; 00174 SysLink_MemEntry_Block * memBlocks; 00176 } SysLink_MemoryMap; 00177 00178 /* 00179 * Config params override strings. 00180 * 00181 * "ProcMgr.proc[DSP].mmuEnable=FALSE;" 00182 * "ProcMgr.proc[VPSS-M3].mmuEnable=TRUE;" 00183 * "SharedRegion.entry[1].cacheEnable=FALSE;" 00184 * "SharedRegion.entry[3].cacheEnable=FALSE;" 00185 */ 00186 extern String SysLink_params; 00187 00188 00189 /* ============================================================================= 00190 * APIs 00191 * ============================================================================= 00192 */ 00201 Void SysLink_setup (Void); 00202 00211 Void SysLink_destroy (Void); 00212 00213 00214 #if defined (__cplusplus) 00215 } 00216 #endif 00217 00218 00219 #endif /*_SysLink_H_*/ 00220 00221