/************************************************************************************
* FILE PURPOSE: C6474 Device Specific functions
************************************************************************************
- * FILE NAME: c6474l.c
+ * FILE NAME: c6474.c
*
* DESCRIPTION: Implements the device specific functions for the IBL
*
- * @file c6474l.c
+ * @file c6474.c
*
* @brief
* This file implements the device specific functions for the IBL
#include "emif31api.h"
#include "pscapi.h"
#include "gpio.h"
+#include "nandhwapi.h"
#include <string.h>
extern cregister unsigned int DNUM;
}
-/**
- * @brief Configure the PLLs
- *
- * @details
- * Only the main PLL can be configured here. The DDR pll is enabled by default,
- * and the network PLL is enabled through serdes configuration.
- * the multiplier and dividers.
- */
-void devicePllConfig (void)
-{
- if (ibl.pllConfig[ibl_MAIN_PLL].doEnable == TRUE)
- hwPllSetPll (MAIN_PLL,
- ibl.pllConfig[ibl_MAIN_PLL].prediv,
- ibl.pllConfig[ibl_MAIN_PLL].mult,
- ibl.pllConfig[ibl_MAIN_PLL].postdiv);
-
-}
-
/**
* @brief
* Enable the DDR
}
+unsigned int get_device_switch_setting()
+{
+ volatile unsigned int w;
+ unsigned int v;
+
+ w = *((uint32 *)0x02880804);
+ v = w & 0x40;
+ v = v >> 6;
+
+ return(v);
+}
/**
* @brief Enable the pass through version of the nand controller
* @details On the evm the nand controller is enabled by setting
* gpio 14 high
*/
-#if 0
+#ifndef EXCLUDE_NAND_GPIO
int32 deviceConfigureForNand(void)
{
hwGpioSetDirection(NAND_MODE_GPIO, GPIO_OUT);
maddr[5] = (macA >> 0) & 0xff;
}
+/**
+ * @brief Return the NAND interface call table. Only GPIO is supported on c6474
+ */
+
+#ifndef EXCLUDE_NAND_GPIO
+nandCtbl_t nandCtbl = {
+
+ nandHwGpioDriverInit,
+ nandHwGpioDriverReadBytes,
+ nandHwGpioDriverReadPage,
+ nandHwGpioDriverClose
+
+};
+
+nandCtbl_t *deviceGetNandCtbl (int32 interface)
+{
+ return (&nandCtbl);
+}
+#endif
+