1 /**
2 * @file c6474init.c
3 *
4 * @brief
5 * c6474 functions used during the initial stage of the ibl load
6 */
7 #include "ibl.h"
8 #include "device.h"
9 #include "pllapi.h"
12 /**
13 * @brief Configure the PLLs
14 *
15 * @details
16 * Only the main PLL can be configured here. The DDR pll is enabled by default,
17 * and the network PLL is enabled through serdes configuration.
18 * the multiplier and dividers.
19 */
20 void devicePllConfig (void)
21 {
22 if (ibl.pllConfig[ibl_MAIN_PLL].doEnable == TRUE)
23 hwPllSetPll (MAIN_PLL,
24 ibl.pllConfig[ibl_MAIN_PLL].prediv,
25 ibl.pllConfig[ibl_MAIN_PLL].mult,
26 ibl.pllConfig[ibl_MAIN_PLL].postdiv);
28 }
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 }