summaryrefslogtreecommitdiff
path: root/board/cobra5272/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cobra5272/flash.c')
-rw-r--r--board/cobra5272/flash.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index 616842e62f4..7d81036647e 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -11,7 +11,7 @@
#include <irq_func.h>
#include <stdio.h>
#include <time.h>
-#include <uuid.h>
+#include <u-boot/uuid.h>
#include <vsprintf.h>
#include <linux/delay.h>
#include <linux/string.h>
@@ -135,22 +135,22 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
{
ulong result;
int iflag, cflag, prot, sect;
- int rc = ERR_OK;
+ int rc = FL_ERR_OK;
int chip1;
ulong start;
/* first look for protection bits */
if (info->flash_id == FLASH_UNKNOWN)
- return ERR_UNKNOWN_FLASH_TYPE;
+ return FL_ERR_UNKNOWN_FLASH_TYPE;
if ((s_first < 0) || (s_first > s_last)) {
- return ERR_INVAL;
+ return FL_ERR_INVAL;
}
if ((info->flash_id & FLASH_VENDMASK) !=
(AMD_MANUFACT & FLASH_VENDMASK)) {
- return ERR_UNKNOWN_FLASH_VENDOR;
+ return FL_ERR_UNKNOWN_FLASH_VENDOR;
}
prot = 0;
@@ -160,7 +160,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
}
}
if (prot)
- return ERR_PROTECTED;
+ return FL_ERR_PROTECTED;
/*
* Disable interrupts which might cause a timeout
@@ -217,11 +217,11 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
if (chip1 == ERR) {
- rc = ERR_PROG_ERROR;
+ rc = FL_ERR_PROG_ERROR;
goto outahere;
}
if (chip1 == TMO) {
- rc = ERR_TIMEOUT;
+ rc = FL_ERR_TIMEOUT;
goto outahere;
}
@@ -252,7 +252,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
{
volatile u16 *addr = (volatile u16 *) dest;
ulong result;
- int rc = ERR_OK;
+ int rc = FL_ERR_OK;
int cflag, iflag;
int chip1;
ulong start;
@@ -262,7 +262,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
*/
result = *addr;
if ((result & data) != data)
- return ERR_NOT_ERASED;
+ return FL_ERR_NOT_ERASED;
/*
* Disable interrupts which might cause a timeout
@@ -302,7 +302,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
*addr = CMD_READ_ARRAY;
if (chip1 == ERR || *addr != data)
- rc = ERR_PROG_ERROR;
+ rc = FL_ERR_PROG_ERROR;
if (iflag)
enable_interrupts();
@@ -320,13 +320,13 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
if (addr & 1) {
printf ("unaligned destination not supported\n");
- return ERR_ALIGN;
+ return FL_ERR_ALIGN;
}
#if 0
if (cnt & 1) {
printf ("odd transfer sizes not supported\n");
- return ERR_ALIGN;
+ return FL_ERR_ALIGN;
}
#endif
@@ -364,5 +364,5 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
cnt -= 1;
}
- return ERR_OK;
+ return FL_ERR_OK;
}