projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
[oweals/u-boot.git]
/
board
/
incaip
/
flash.c
diff --git
a/board/incaip/flash.c
b/board/incaip/flash.c
index 74dd6fee6218d8ab6d7f92cedd1499a82a13316c..cc11e24fefe128c3913e1697cf0d1102aebc92ce 100644
(file)
--- a/
board/incaip/flash.c
+++ b/
board/incaip/flash.c
@@
-24,7
+24,7
@@
#include <common.h>
#include <asm/inca-ip.h>
#include <common.h>
#include <asm/inca-ip.h>
-flash_info_t flash_info[C
FG_MAX_FLASH_BANKS]; /* info for FLASH chips
*/
+flash_info_t flash_info[C
ONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips
*/
/* NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it
* has nothing to do with the flash chip being 8-bit or 16-bit.
/* NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it
* has nothing to do with the flash chip being 8-bit or 16-bit.
@@
-73,7
+73,7
@@
unsigned long flash_init (void)
int i;
/* Init: no FLASHes known */
int i;
/* Init: no FLASHes known */
- for (i=0; i < C
FG
_MAX_FLASH_BANKS; ++i) {
+ for (i=0; i < C
ONFIG_SYS
_MAX_FLASH_BANKS; ++i) {
ulong flashbase = (i == 0) ? PHYS_FLASH_1 : PHYS_FLASH_2;
ulong * buscon = (ulong *)
((i == 0) ? INCA_IP_EBU_EBU_BUSCON0 : INCA_IP_EBU_EBU_BUSCON2);
ulong flashbase = (i == 0) ? PHYS_FLASH_1 : PHYS_FLASH_2;
ulong * buscon = (ulong *)
((i == 0) ? INCA_IP_EBU_EBU_BUSCON0 : INCA_IP_EBU_EBU_BUSCON2);
@@
-96,12
+96,12
@@
unsigned long flash_init (void)
size += flash_info[i].size;
}
size += flash_info[i].size;
}
-#if C
FG_MONITOR_BASE >= CFG
_FLASH_BASE
+#if C
ONFIG_SYS_MONITOR_BASE >= CONFIG_SYS
_FLASH_BASE
/* monitor protection ON by default */
flash_protect(FLAG_PROTECT_SET,
/* monitor protection ON by default */
flash_protect(FLAG_PROTECT_SET,
- C
FG
_MONITOR_BASE,
- C
FG
_MONITOR_BASE+monitor_flash_len-1,
- flash_get_info(C
FG
_MONITOR_BASE));
+ C
ONFIG_SYS
_MONITOR_BASE,
+ C
ONFIG_SYS
_MONITOR_BASE+monitor_flash_len-1,
+ flash_get_info(C
ONFIG_SYS
_MONITOR_BASE));
#endif
#ifdef CONFIG_ENV_IS_IN_FLASH
#endif
#ifdef CONFIG_ENV_IS_IN_FLASH
@@
-173,13
+173,13
@@
static flash_info_t *flash_get_info(ulong base)
int i;
flash_info_t * info;
int i;
flash_info_t * info;
- for (i = 0; i < C
FG
_MAX_FLASH_BANKS; i ++) {
+ for (i = 0; i < C
ONFIG_SYS
_MAX_FLASH_BANKS; i ++) {
info = & flash_info[i];
if (info->start[0] <= base && base < info->start[0] + info->size)
break;
}
info = & flash_info[i];
if (info->start[0] <= base && base < info->start[0] + info->size)
break;
}
- return i == C
FG
_MAX_FLASH_BANKS ? 0 : info;
+ return i == C
ONFIG_SYS
_MAX_FLASH_BANKS ? 0 : info;
}
/*-----------------------------------------------------------------------
}
/*-----------------------------------------------------------------------
@@
-484,7
+484,7
@@
int flash_erase (flash_info_t *info, int s_first, int s_last)
udelay (1000);
while ((*addr & (FPW)0x00800080) != (FPW)0x00800080) {
udelay (1000);
while ((*addr & (FPW)0x00800080) != (FPW)0x00800080) {
- if ((now = get_timer(start)) > C
FG
_FLASH_ERASE_TOUT) {
+ if ((now = get_timer(start)) > C
ONFIG_SYS
_FLASH_ERASE_TOUT) {
printf ("Timeout\n");
if (intel) {
printf ("Timeout\n");
if (intel) {
@@
-498,14
+498,14
@@
int flash_erase (flash_info_t *info, int s_first, int s_last)
}
/* show that we're waiting */
}
/* show that we're waiting */
- if ((get_timer(last)) > C
FG
_HZ) {/* every second */
+ if ((get_timer(last)) > C
ONFIG_SYS
_HZ) {/* every second */
putc ('.');
last = get_timer(0);
}
}
/* show that we're waiting */
putc ('.');
last = get_timer(0);
}
}
/* show that we're waiting */
- if ((get_timer(last)) > C
FG_HZ) {
/* every second */
+ if ((get_timer(last)) > C
ONFIG_SYS_HZ) {
/* every second */
putc ('.');
last = get_timer(0);
}
putc ('.');
last = get_timer(0);
}
@@
-609,7
+609,7
@@
static int write_word_amd (flash_info_t *info, FPWV *dest, FPW data)
/* data polling for D7 */
while (res == 0 && (*dest & (FPW)0x00800080) != (data & (FPW)0x00800080)) {
/* data polling for D7 */
while (res == 0 && (*dest & (FPW)0x00800080) != (data & (FPW)0x00800080)) {
- if (get_timer(start) > C
FG
_FLASH_WRITE_TOUT) {
+ if (get_timer(start) > C
ONFIG_SYS
_FLASH_WRITE_TOUT) {
*dest = (FPW)0x00F000F0; /* reset bank */
res = 1;
}
*dest = (FPW)0x00F000F0; /* reset bank */
res = 1;
}
@@
-655,7
+655,7
@@
static int write_word_intel (flash_info_t *info, FPWV *dest, FPW data)
start = get_timer (0);
while (res == 0 && (*dest & (FPW)0x00800080) != (FPW)0x00800080) {
start = get_timer (0);
while (res == 0 && (*dest & (FPW)0x00800080) != (FPW)0x00800080) {
- if (get_timer(start) > C
FG
_FLASH_WRITE_TOUT) {
+ if (get_timer(start) > C
ONFIG_SYS
_FLASH_WRITE_TOUT) {
*dest = (FPW)0x00B000B0; /* Suspend program */
res = 1;
}
*dest = (FPW)0x00B000B0; /* Suspend program */
res = 1;
}