]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/device/c6455/c6455init.c
Merge branch 'tmp-mike2' of gtgit01.gt.design.ti.com:git/teams/mmi/ibl into tmp-mike2
[keystone-rtos/ibl.git] / src / device / c6455 / c6455init.c
1 /************************************************************************************
2  * FILE PURPOSE: C6455 Device Specific functions used in the 1st load stage
3  ************************************************************************************
4  * FILE NAME: c6455init.c
5  *
6  * DESCRIPTION: Implements the device specific functions for the IBL
7  *
8  * @file c6455.c
9  *
10  * @brief
11  *  This file implements the device specific functions for the IBL
12  *
13  ************************************************************************************/
14 #include "ibl.h"
15 #include "device.h"
16 #include "pllapi.h"
17 #include "emif31api.h"
20 /**
21  * @brief Configure the PLLs
22  *
23  * @details
24  *   Only the main PLL is enabled. The second pll is used for
25  *   emac and DDR, with a fixed multiplier, and is enabled
26  *   at power up. The divider is configurable, but not done here.
27  */
28 void devicePllConfig (void)
29 {
30     if (ibl.pllConfig[ibl_MAIN_PLL].doEnable == TRUE)
31         hwPllSetPll (MAIN_PLL, 
32                      ibl.pllConfig[ibl_MAIN_PLL].prediv,
33                      ibl.pllConfig[ibl_MAIN_PLL].mult,
34                      ibl.pllConfig[ibl_MAIN_PLL].postdiv);
36 }
40 /**
41  * @brief
42  *  Return the endian status of the device
43  *
44  * @details
45  *  Returns true if the device is executing in little endian mode
46  */
47 extern cregister volatile unsigned int CSR;
49 bool deviceIsLittleEndian (void)
50 {
51     if ((CSR & (1 << 8)) == 0)    
52         return (FALSE);
54     return (TRUE);
56 }