projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename CFG_ macros to CONFIG_SYS
[platform/kernel/u-boot.git]
/
board
/
cmi
/
flash.c
diff --git
a/board/cmi/flash.c
b/board/cmi/flash.c
index
0d4582b
..
630c330
100644
(file)
--- a/
board/cmi/flash.c
+++ b/
board/cmi/flash.c
@@
-38,7
+38,7
@@
#if defined(CONFIG_ENV_IS_IN_FLASH)
# ifndef CONFIG_ENV_ADDR
#if defined(CONFIG_ENV_IS_IN_FLASH)
# ifndef CONFIG_ENV_ADDR
-# define CONFIG_ENV_ADDR (C
FG
_FLASH_BASE + CONFIG_ENV_OFFSET)
+# define CONFIG_ENV_ADDR (C
ONFIG_SYS
_FLASH_BASE + CONFIG_ENV_OFFSET)
# endif
# ifndef CONFIG_ENV_SIZE
# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
# endif
# ifndef CONFIG_ENV_SIZE
# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
@@
-62,7
+62,7
@@
#define FLASH_CMD_PROTECT_CLEAR 0x00D0
#define FLASH_STATUS_DONE 0x0080
#define FLASH_CMD_PROTECT_CLEAR 0x00D0
#define FLASH_STATUS_DONE 0x0080
-flash_info_t flash_info[C
FG
_MAX_FLASH_BANKS];
+flash_info_t flash_info[C
ONFIG_SYS
_MAX_FLASH_BANKS];
/*
* Local function prototypes
/*
* Local function prototypes
@@
-81,7
+81,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) {
flash_info[i].flash_id = FLASH_UNKNOWN;
}
flash_info[i].flash_id = FLASH_UNKNOWN;
}
@@
-102,11
+102,11
@@
unsigned long flash_init (void)
flash_info[0].size = size_b0;
flash_info[0].size = size_b0;
-#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,
+ C
ONFIG_SYS
_MONITOR_BASE,
+ C
ONFIG_SYS
_MONITOR_BASE+monitor_flash_len-1,
&flash_info[0]);
#endif
&flash_info[0]);
#endif
@@
-268,10
+268,10
@@
static ulong flash_get_size (vu_short *addr, flash_info_t *info)
}
}
- if (info->sector_count > C
FG
_MAX_FLASH_SECT) {
+ if (info->sector_count > C
ONFIG_SYS
_MAX_FLASH_SECT) {
printf ("** ERROR: sector count %d > max (%d) **\n",
printf ("** ERROR: sector count %d > max (%d) **\n",
- info->sector_count, C
FG
_MAX_FLASH_SECT);
- info->sector_count = C
FG
_MAX_FLASH_SECT;
+ info->sector_count, C
ONFIG_SYS
_MAX_FLASH_SECT);
+ info->sector_count = C
ONFIG_SYS
_MAX_FLASH_SECT;
}
addr[0] = FLASH_CMD_RESET; /* restore read mode */
}
addr[0] = FLASH_CMD_RESET; /* restore read mode */
@@
-345,7
+345,7
@@
int flash_erase (flash_info_t *info, int s_first, int s_last)
udelay (1000);
while (((status = *addr) & FLASH_STATUS_DONE) != FLASH_STATUS_DONE) {
udelay (1000);
while (((status = *addr) & FLASH_STATUS_DONE) != FLASH_STATUS_DONE) {
- if ((now=get_timer(start)) > C
FG
_FLASH_ERASE_TOUT) {
+ if ((now=get_timer(start)) > C
ONFIG_SYS
_FLASH_ERASE_TOUT) {
printf("Flash erase timeout at address %lx\n", info->start[sect]);
*addr = FLASH_CMD_SUSPEND_ERASE;
*addr = FLASH_CMD_RESET;
printf("Flash erase timeout at address %lx\n", info->start[sect]);
*addr = FLASH_CMD_SUSPEND_ERASE;
*addr = FLASH_CMD_RESET;
@@
-473,7
+473,7
@@
static int write_short (flash_info_t *info, ulong dest, ushort data)
/* wait for error or finish */
while(!(addr[0] & FLASH_STATUS_DONE)){
/* wait for error or finish */
while(!(addr[0] & FLASH_STATUS_DONE)){
- if (get_timer(start) > C
FG
_FLASH_WRITE_TOUT) {
+ if (get_timer(start) > C
ONFIG_SYS
_FLASH_WRITE_TOUT) {
addr[0] = FLASH_CMD_RESET;
return (1);
}
addr[0] = FLASH_CMD_RESET;
return (1);
}
@@
-504,7
+504,7
@@
int flash_real_protect(flash_info_t *info, long sector, int prot)
/* wait for error or finish */
start = get_timer (0);
while(!(addr[0] & FLASH_STATUS_DONE)){
/* wait for error or finish */
start = get_timer (0);
while(!(addr[0] & FLASH_STATUS_DONE)){
- if (get_timer(start) > C
FG
_FLASH_ERASE_TOUT) {
+ if (get_timer(start) > C
ONFIG_SYS
_FLASH_ERASE_TOUT) {
printf("Flash protect timeout at address %lx\n", info->start[sector]);
addr[0] = FLASH_CMD_RESET;
return (1);
printf("Flash protect timeout at address %lx\n", info->start[sector]);
addr[0] = FLASH_CMD_RESET;
return (1);