Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

da8xxgem_hal.h

Go to the documentation of this file.
00001 /** ============================================================================
00002  *  @file   da8xxgem_hal.h
00003  *
00004  *  @path   $(DSPLINK)/gpp/inc/sys/arch/DA8XXGEM/
00005  *
00006  *  @brief  Hardware Abstraction Layer for Power Controller (PWR)
00007  *          module in Primus. 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 (DA8XXGEM_HAL_H)
00046 #define DA8XXGEM_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  Register access method.
00069  *  ============================================================================
00070  */
00071 #define REG(x)              *((volatile Uint32 *) (x))
00072 
00073 /*  ============================================================================
00074  *  @const  OFFSET_KICK0
00075  *
00076  *  @brief  Offset of the kick0 register.
00077  *  ============================================================================
00078  */
00079 #define  OFFSET_KICK0            0x038u
00080 
00081 /*  ============================================================================
00082  *  @const  OFFSET_KICK1
00083  *
00084  *  @brief  Offset of the kick1 register.
00085  *  ============================================================================
00086  */
00087 #define  OFFSET_KICK1            0x03Cu
00088 
00089 /*  ============================================================================
00090  *  @const  KICK0_UNLOCKVAL
00091  *
00092  *  @brief  VALUE to be written to unlock kick0 area.
00093  *  ============================================================================
00094  */
00095 #define  KICK0_UNLOCKVAL         0x83E70B13u
00096 
00097 /*  ============================================================================
00098  *  @const  KICK1_UNLOCKVAL
00099  *
00100  *  @brief  VALUE to be written to unlock kick1 area.
00101  *  ============================================================================
00102  */
00103 #define  KICK1_UNLOCKVAL         0x95A4F1E0u
00104 
00105 /** ============================================================================
00106  *  @name   DA8XXGEM_HalObj
00107  *
00108  *  @brief  Hardware Abstraction object.
00109  *
00110  *  @param  interface
00111  *              Pointer to HAL interface table.
00112  *  @param  baseCfgBus
00113  *              base address of the configuration bus peripherals memory range.
00114  *  @param  offsetSysModule
00115  *              Offset of the system module from CFG base.
00116  *  @param  offsetPsc0
00117  *              Offset of the PSC0 from CFG base.
00118  *  ============================================================================
00119  */
00120 typedef struct DA8XXGEM_HalObj_tag {
00121     HAL_Interface * interface       ;
00122     Uint32          baseCfgBus      ;
00123     Uint32          offsetSysModule ;
00124     Uint32          offsetPsc0      ;
00125 } DA8XXGEM_HalObj ;
00126 
00127 /** ============================================================================
00128  *  @name   DA8XX_InitParams
00129  *
00130  *  @brief  Initialize parameters for HAL init call.
00131  *
00132  *  @param  dspId
00133  *              Processor Identifier.
00134  *  ============================================================================
00135  */
00136 typedef struct DA8XXGEM_InitParams_tag {
00137     ProcessorId dspId   ;
00138 } DA8XXGEM_InitParams ;
00139 
00140 /** ============================================================================
00141  *  @func   DA8XXGEM_halInitialize
00142  *
00143  *  @brief  Initializes the HAL object.
00144  *
00145  *  @param halObj.
00146  *              Pointer to HAL object.
00147  *  @param initParams.
00148  *              Parameters for initialize (optional).
00149  *
00150  *  @return DSP_SOK
00151  *              Operation successfully completed.
00152  *          DSP_EMEMORY
00153  *              A memory allocation failure occurred.
00154  *          DSP_EINVALIDARG
00155  *              An invalid argument was specified.
00156  *
00157  *  @pre    None.
00158  *
00159  *  @post   None.
00160  *
00161  *  @see    None
00162  *  ============================================================================
00163  */
00164 NORMAL_API
00165 DSP_STATUS
00166 DA8XXGEM_halInit (IN     Pvoid * halObj,
00167                   IN     Pvoid   initParams) ;
00168 
00169 
00170 /** ============================================================================
00171  *  @func   DA8XXGEM_halExit
00172  *
00173  *  @brief  Finalizes the HAL object.
00174  *
00175  *  @param halObj.
00176  *              Pointer to HAL object.
00177  *
00178  *  @return DSP_SOK
00179  *              Operation successfully completed.
00180  *          DSP_EFAIL
00181  *              All other error conditions.
00182  *
00183  *  @pre    None.
00184  *
00185  *  @post   None.
00186  *
00187  *  @see    None
00188  *  ============================================================================
00189  */
00190 NORMAL_API
00191 DSP_STATUS
00192 DA8XXGEM_halExit (IN     Pvoid * halObj) ;
00193 
00194 
00195 #if defined (__cplusplus)
00196 }
00197 #endif
00198 
00199 
00200 #endif  /* !defined (DA8XXGEM_HAL_H) */

Generated on Fri Jul 16 14:34:01 2010 for DSP/BIOSLink by  doxygen 1.4.4