00001 00009 /* 00010 * ============================================================================ 00011 * 00012 * Copyright (c) 2008-2012, 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 */ 00065 00066 /* The bulk of this file is wrapped in this doxygen INTERNAL as it's not intended 00067 * to be used by end users. Most of this is implementation details that users 00068 * shouldn't see or bind to. 00069 */ 00070 00080 #define IPC_BUFFER_ALIGN(x, y) (UInt32)((UInt32)((x + y - 1) / y) * y) 00081 00082 00086 #define SYSLINK_MAX_MEMENTRIES 10 00087 00091 #define SYSLINK_MAX_NAMELENGTH 32 00092 00093 /* ============================================================================= 00094 * Structures & Enums 00095 * ============================================================================= 00096 */ 00097 00098 typedef UInt32 SysLink_MapMask; 00099 00103 #define SysLink_MASTERKNLVIRT (SysLink_MapMask)(1 << 0) 00104 00108 #define SysLink_MASTERUSRVIRT (SysLink_MapMask)(1 << 1) 00109 00113 #define SysLink_SLAVEVIRT (SysLink_MapMask)(1 << 2) 00114 00118 typedef enum SysLink_NotifyType_tag { 00119 SysLink_NOTIFICATION_NONE = 0, 00121 SysLink_NOTIFICATION_ALWAYS = 1, 00123 SysLink_NOTIFICATION_ONCE = 2, 00128 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS = 3, 00132 SysLink_NOTIFICATION_HDWRFIFO_ONCE = 4 00138 } SysLink_NotifyType; 00139 00143 typedef struct SysLink_MemEntry_tag { 00144 UInt32 slaveVirtAddr; 00145 UInt32 masterPhysAddr; 00146 UInt32 size; 00147 SysLink_MapMask mapMask; 00148 Bool map; 00151 Bool isCached; 00154 Bool isValid; 00155 } SysLink_MemEntry; 00156 00160 typedef struct SysLink_MemEntry_Block_tag { 00161 Char procName[SYSLINK_MAX_NAMELENGTH]; 00163 UInt32 numEntries; 00165 SysLink_MemEntry memEntries [SYSLINK_MAX_MEMENTRIES]; 00167 } SysLink_MemEntry_Block; 00168 00169 00173 typedef struct SysLink_MemoryMap_tag { 00174 UInt16 numBlocks; 00176 SysLink_MemEntry_Block * memBlocks; 00178 } SysLink_MemoryMap; 00179 00207 extern String SysLink_params; 00208 00209 00210 /* ============================================================================= 00211 * APIs 00212 * ============================================================================= 00213 */ 00222 Void SysLink_setup (Void); 00223 00232 Void SysLink_destroy (Void); 00233 00234 00235 #if defined (__cplusplus) 00236 } 00237 #endif 00238 00239 00240 #endif /*_SysLink_H_*/