]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/device/c6472/c6472init.c
Added two stage load for c6455 and c6474
[keystone-rtos/ibl.git] / src / device / c6472 / c6472init.c
1 /**
2  * @file c6472init.c
3  *
4  * @brief
5  *              c6472 functions used during the initial stage of the ibl load
6  *
7  */
8 #include "ibl.h"
9 #include "device.h"
10 #include "pllapi.h"
12 /**
13  * @brief Configure the PLLs
14  *
15  * @details
16  *   The three PLLs are enabled. Only the main PLL has the ability to configure
17  *   the multiplier and dividers.
18  */
19 void devicePllConfig (void)
20 {
21     if (ibl.pllConfig[ibl_MAIN_PLL].doEnable == TRUE)
22         hwPllSetPll (MAIN_PLL, 
23                      ibl.pllConfig[ibl_MAIN_PLL].prediv,
24                      ibl.pllConfig[ibl_MAIN_PLL].mult,
25                      ibl.pllConfig[ibl_MAIN_PLL].postdiv);
27     if (ibl.pllConfig[ibl_DDR_PLL].doEnable == TRUE)
28         hwPllEnable (DDR_PLL);
30     if (ibl.pllConfig[ibl_NET_PLL].doEnable == TRUE)
31         hwPllEnable (NET_PLL);
34 }
37 /**
38  * @brief
39  *  Return the endian status of the device
40  *
41  * @details
42  *  Returns true if the device is executing in little endian mode
43  */
44 extern cregister volatile unsigned int CSR;
46 bool deviceIsLittleEndian (void)
47 {
48     if ((CSR & (1 << 8)) == 0)    
49         return (FALSE);
51     return (TRUE);
53 }