1 /**
2 * @file c6457init.c
3 *
4 * @brief
5 * c6457 functions used during the initial stage of the ibl load
6 */
7 #include "ibl.h"
8 #include "device.h"
9 #include "pllapi.h"
11 /**
12 * @brief Configure the PLLs
13 *
14 * @details
15 * Only the main PLL can be configured here. The DDR pll is enabled by default,
16 * and the network PLL is enabled through serdes configuration.
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 }
31 /**
32 * @brief
33 * Return the endian status of the device
34 *
35 * @details
36 * Returns true if the device is executing in little endian mode
37 */
38 extern cregister volatile unsigned int CSR;
40 bool deviceIsLittleEndian (void)
41 {
42 if ((CSR & (1 << 8)) == 0)
43 return (FALSE);
45 return (TRUE);
47 }