]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blobdiff - src/device/c6457/c6457.c
C6457: Add address translation issues
[keystone-rtos/ibl.git] / src / device / c6457 / c6457.c
index ef06ed32f4a857402ec9ba129d02de61145e29da..e44d367d99eadba5cc39a3d3cfeb23df9cc9bd44 100644 (file)
@@ -54,6 +54,7 @@
 #include "emif31api.h"
 #include "pscapi.h"
 #include "gpio.h"
+#include "nandhwapi.h"
 #include <string.h>
 
 extern cregister unsigned int DNUM;
@@ -68,7 +69,7 @@ extern cregister unsigned int DNUM;
 bool address_is_local (Uint32 addr)
 {
     /* L2 */
-    if ((addr >= 0x00800000) && (addr < 0x00898000))
+    if ((addr >= 0x00800000) && (addr < 0x00a00000))
         return (TRUE);
 
     /* L1P */
@@ -94,9 +95,6 @@ bool address_is_local (Uint32 addr)
 Uint32 deviceLocalAddrToGlobal (Uint32 addr)
 {
 
-    if (address_is_local (addr))
-        addr = (1 << 28) | (DNUM << 24) | addr;
-
     return (addr);
 
 }
@@ -145,7 +143,7 @@ int32 devicePowerPeriph (int32 modNum)
  *  @details  On the evm the nand controller is enabled by setting 
  *            gpio 14 high
  */
-#ifndef EXCLUDE_NAND
+#ifndef EXCLUDE_NAND_GPIO
 int32 deviceConfigureForNand(void)
 {
        hwGpioSetDirection(NAND_MODE_GPIO, GPIO_OUT);
@@ -177,6 +175,26 @@ void deviceLoadDefaultEthAddress (uint8 *maddr)
 }
 
 
+/**
+ *  @brief  Return the NAND interface call table. Only GPIO is supported on c6457
+ */
+
+#ifndef EXCLUDE_NAND_GPIO
+nandCtbl_t nandCtbl =  {
+
+    nandHwDriverInit,
+    nandHwDriverReadBytes,
+    nandHwDriverReadPage,
+    nandHwDriverClose
+
+};
+
+nandCtbl_t *deviceGetNandCtbl (int32 interface)
+{
+    return (&nandCtbl);
+}
+#endif
+