]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blobdiff - src/device/c66x/c66xutil.c
Code review changes to ensure ddr3_mem_test() picking up types.h definition
[keystone-rtos/ibl.git] / src / device / c66x / c66xutil.c
index c895bcfdf72711dc0a8bcd6bb85445edea8a755d..29cf7521a7d651bccbe47bffde6e5be81520da7c 100644 (file)
@@ -6,13 +6,9 @@
  */
 
 #include "device.h"
+#include "target.h"
 #include "pllapi.h"
-#include <string.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
+#include "types.h"
 
 /**
  *  @brief
@@ -131,7 +127,7 @@ int32 devicePowerPeriph (int32 modNum)
         
 }
 
-#ifdef DDR3_TEST_ENABLE
+#ifdef PLL_REINIT_WORKAROUND
 /**
  *  @brief Simple DDR3 test
  *
@@ -141,19 +137,19 @@ int32 devicePowerPeriph (int32 modNum)
  */
 
 
-int32_t ddr3_memory_test (void)
+UINT32 ddr3_memory_test (void)
 {
-       uint32_t index, value;
+        UINT32 index, value;
 
        /* Write a pattern */
        for (index = DDR3_TEST_START_ADDRESS; index < DDR3_TEST_END_ADDRESS; index += 4) {
-               *(volatile uint32_t *) index = (uint32_t)index;
+               *(VUint32 *) index = (UINT32)index;
        }
 
        /* Read and check the pattern */
        for (index = DDR3_TEST_START_ADDRESS; index < DDR3_TEST_END_ADDRESS; index += 4) {
 
-               value = *(uint32_t *) index;
+               value = *(UINT32 *) index;
 
                if (value  != index) {
                        return -1;
@@ -162,13 +158,13 @@ int32_t ddr3_memory_test (void)
 
        /* Write a pattern for complementary values */
        for (index = DDR3_TEST_START_ADDRESS; index < DDR3_TEST_END_ADDRESS; index += 4) {
-               *(volatile uint32_t *) index = (uint32_t)~index;
+               *(VUint32 *) index = (UINT32)~index;
        }
 
        /* Read and check the pattern */
        for (index = DDR3_TEST_START_ADDRESS; index < DDR3_TEST_END_ADDRESS; index += 4) {
 
-               value = *(uint32_t *) index;
+               value = *(UINT32 *) index;
 
                if (value  != ~index) {
                        return -1;