![]() |
![]() |
00001 /* ============================================================================ 00002 * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005, 2008 00003 * 00004 * Use of this software is controlled by the terms and conditions found in the 00005 * license agreement under which this software has been supplied. 00006 * ============================================================================ 00007 */ 00008 00016 /* ============================================================================ 00017 * Revision History 00018 * ================ 00019 * 21-Aug-2008 Created 00020 * ============================================================================ 00021 */ 00022 00048 #ifndef _CSL_PLL_H_ 00049 #define _CSL_PLL_H_ 00050 00051 00052 #ifdef __cplusplus 00053 extern "C" { 00054 #endif 00055 00056 #include "csl_error.h" 00057 #include "csl_types.h" 00058 #include "soc.h" 00059 #include "csl_general.h" 00060 00086 /*****************************************************************************\ 00087 * PLL global macro declarations 00088 \*****************************************************************************/ 00089 00092 #define TIMEOUT (0x1fff) 00093 00095 #define CSL_SYS_CGCR2_INIT_VALUE (0x0806) 00096 00104 /**************************************************************************\ 00105 * PLLC global typedef declarations * 00106 \**************************************************************************/ 00107 00109 typedef struct PLL_Obj* PLL_Handle; 00110 00118 /**************************************************************************\ 00119 * PLLC global enum declaration * 00120 \**************************************************************************/ 00121 00125 typedef enum 00126 { 00128 CSL_PLL_INST_0 = (0u), 00130 CSL_PLL_INST_INVALID = (1u) 00131 } CSL_PllInsId; 00139 /**************************************************************************\ 00140 * PLLC global data structures * 00141 \**************************************************************************/ 00142 00147 typedef struct 00148 { 00151 Uint16 PLLCNTL1; 00152 00154 Uint16 PLLINCNTL; 00155 00158 Uint16 PLLCNTL2; 00159 00161 Uint16 PLLOUTCNTL; 00162 00163 } PLL_Config; 00164 00178 typedef struct PLL_Obj{ 00181 PLL_Config *pllConfig; 00183 Uint32 instId; 00185 CSL_SysRegsOvly sysAddr; 00186 00187 } PLL_Obj; 00188 00193 /*****************************************************************************\ 00194 * PLL function declarations * 00195 \*****************************************************************************/ 00196 00235 CSL_Status PLL_init( PLL_Obj * pllObj, 00236 Uint32 pllInstId 00237 ); 00238 00288 CSL_Status PLL_config( 00289 PLL_Handle hPll, 00290 PLL_Config *pconfigInfo 00291 ); 00292 00342 CSL_Status PLL_enable( 00343 PLL_Handle hPll 00344 ); 00345 00392 CSL_Status PLL_bypass( 00393 PLL_Handle hPll 00394 ); 00395 00436 CSL_Status PLL_reset( 00437 PLL_Handle hPll 00438 ); 00441 #ifdef __cplusplus 00442 } 00443 #endif 00444 #endif /* _CSL_PLL_H_ */ 00445 00446
1.7.4