00001 /** ============================================================================ 00002 * @file tnetv107xgem_hal.h 00003 * 00004 * @path $(DSPLINK)/gpp/inc/sys/arch/TNETV107XGEM/ 00005 * 00006 * @brief Hardware Abstraction Layer for Power Controller (PWR) 00007 * module in Davinci. Declares necessary functions for 00008 * PSC request handling. 00009 * 00010 * @ver 1.65.00.03 00011 * ============================================================================ 00012 * @copyright Copyright (C) 2002-2009, Texas Instruments Incorporated - 00013 * http://www.ti.com/ 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions 00017 * are met: 00018 * 00019 * * Redistributions of source code must retain the above copyright 00020 * notice, this list of conditions and the following disclaimer. 00021 * 00022 * * Redistributions in binary form must reproduce the above copyright 00023 * notice, this list of conditions and the following disclaimer in the 00024 * documentation and/or other materials provided with the distribution. 00025 * 00026 * * Neither the name of Texas Instruments Incorporated nor the names of 00027 * its contributors may be used to endorse or promote products derived 00028 * from this software without specific prior written permission. 00029 * 00030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00031 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00032 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00033 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00034 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00035 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00036 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00037 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00038 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00039 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00040 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00041 * ============================================================================ 00042 */ 00043 00044 00045 #if !defined (TNETV107XGEM_HAL_H) 00046 #define TNETV107XGEM_HAL_H 00047 00048 00049 /* ----------------------------------- DSP/BIOS Link */ 00050 #include <dsplink.h> 00051 #include <_dsplink.h> 00052 00053 /* ----------------------------------- Trace & Debug */ 00054 #include <_trace.h> 00055 00056 /* ----------------------------------- Hardware Abstraction Layer */ 00057 #include <hal.h> 00058 00059 00060 #if defined (__cplusplus) 00061 extern "C" { 00062 #endif 00063 00064 00065 /* ============================================================================ 00066 * @macro REG 00067 * 00068 * @brief Regsiter access method. 00069 * ============================================================================ 00070 */ 00071 #define REG(x) *((volatile Uint32 *) (x)) 00072 00073 00074 /** ============================================================================ 00075 * @name TNETV107XGEM_HalObj 00076 * 00077 * @brief Hardware Abstraction object. 00078 * 00079 * @param interface 00080 * Pointer to HAL interface table. 00081 * @param intdBase 00082 * base address of the INTD regs. 00083 * @param cfgBase 00084 * base address of the Chip Configuration regs. 00085 * @param clkCtrlBase 00086 * base address of the Clock Control regs. 00087 * ============================================================================ 00088 */ 00089 typedef struct TNETV107XGEM_HalObj_tag { 00090 HAL_Interface * interface ; 00091 Uint32 intdBase ; 00092 Uint32 cfgBase ; 00093 Uint32 clkCtrlBase; 00094 } TNETV107XGEM_HalObj ; 00095 00096 00097 /** ============================================================================ 00098 * @func TNETV107XGEM_halInitialize 00099 * 00100 * @brief Initializes the HAL object. 00101 * 00102 * @param halObj. 00103 * Pointer to HAL object. 00104 * @param initParams. 00105 * Parameters for initialize (optional). 00106 * 00107 * @return DSP_SOK 00108 * Operation successfully completed. 00109 * DSP_EMEMORY 00110 * A memory allocation failure occurred. 00111 * DSP_EINVALIDARG 00112 * An invalid argument was specified. 00113 * 00114 * @pre None. 00115 * 00116 * @post None. 00117 * 00118 * @see None 00119 * ============================================================================ 00120 */ 00121 NORMAL_API 00122 DSP_STATUS 00123 TNETV107XGEM_halInit (IN Pvoid * halObj, 00124 IN Pvoid initParams) ; 00125 00126 00127 /** ============================================================================ 00128 * @func TNETV107XGEM_halExit 00129 * 00130 * @brief Finalizes the HAL object. 00131 * 00132 * @param halObj. 00133 * Pointer to HAL object. 00134 * 00135 * @return DSP_SOK 00136 * Operation successfully completed. 00137 * DSP_EFAIL 00138 * All other error conditions. 00139 * 00140 * @pre None. 00141 * 00142 * @post None. 00143 * 00144 * @see None 00145 * ============================================================================ 00146 */ 00147 NORMAL_API 00148 DSP_STATUS 00149 TNETV107XGEM_halExit (IN Pvoid * halObj) ; 00150 00151 00152 #if defined (__cplusplus) 00153 } 00154 #endif 00155 00156 00157 #endif /* !defined (TNETV107XGEM_HAL_H) */