]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blobdiff - src/device/device.h
Single Binary Support: Initial Commit
[keystone-rtos/ibl.git] / src / device / device.h
index 952f328980342b06b8a6b96513d722b6b8422ed6..5d698fc5119c2be093768113f37f86f1cb35010b 100644 (file)
@@ -110,6 +110,12 @@ int32 devicePowerPeriph (int32 modNum);
 void deviceDdrConfig (void);
 
 
+/* Function to get the endian setting of a device */
+unsigned int get_device_endian();
+
+/* Function to get the switch setting of a device */
+unsigned int get_device_switch_setting();
+
 /**
  * @brief
  *    Perform device level configuration for nand boot
@@ -148,8 +154,6 @@ void deviceSetEthResetState (int32 portNum, BOOL applyReset);
   */
 bool deviceIsLittleEndian(void);
 
-#endif
-
 
 /**
  *  @brief
@@ -160,3 +164,54 @@ bool deviceIsLittleEndian(void);
  */
 void chipDelay32 (uint32 nCycles);
 
+
+
+
+/**
+ *  @brief
+ *      Return the NAND interface function table
+ *
+ *  @details
+ *      Some devices support multiple NAND interface at once (EMIF25 and SPI).
+ *      This function returns a pointer to the lower level function
+ *      table to use. The table is selected in the ibl configuration.
+ */
+typedef struct nandCtbl_s  {
+
+    Int32 (*nct_driverInit)      (int32 cs, void *nandDevInfo);
+    Int32 (*nct_driverReadBytes) (Uint32 block, Uint32 page, Uint32 byte, Uint32 nbytes, Uint8 *data);
+    Int32 (*nct_driverReadPage)  (Uint32 block, Uint32 page, Uint8 *data);
+    Int32 (*nct_driverClose)     (void);
+
+} nandCtbl_t;
+
+nandCtbl_t *deviceGetNandCtbl (int32 interface);
+
+
+/**
+ *  @brief
+ *      Return the NOR interface function table
+ *
+ *  @details
+ *      NOR is supported through both SPI and EMIF. This function returns a pointer
+ *      to the lower level function table to use during boot.
+ */
+typedef struct norCtbl_s  {
+
+    Int32 (*nct_driverInit)         (int32 cs);
+    Int32 (*nct_driverReadBytes)    (Uint8 *data, Uint32 nbytes, Uint32 address);
+    Int32 (*nct_driverClose)        (void);
+    
+} norCtbl_t;
+
+norCtbl_t *deviceGetNorCtbl (int32 interface);
+    
+
+
+/**
+ *  @brief
+ *      Return the default SPI device configuration
+ */
+void deviceLoadInitSpiConfig (void *cfg);
+
+#endif