index c895bcfdf72711dc0a8bcd6bb85445edea8a755d..29cf7521a7d651bccbe47bffde6e5be81520da7c 100644 (file)
*/
#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
}
-#ifdef DDR3_TEST_ENABLE
+#ifdef PLL_REINIT_WORKAROUND
/**
* @brief Simple DDR3 test
*
*/
-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;
/* 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;