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
/
netta2
/
flash.c
diff --git
a/board/netta2/flash.c
b/board/netta2/flash.c
index
cefff71
..
b63f459
100644
(file)
--- a/
board/netta2/flash.c
+++ b/
board/netta2/flash.c
@@
-24,7
+24,7
@@
#include <common.h>
#include <mpc8xx.h>
#include <common.h>
#include <mpc8xx.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 */
/*-----------------------------------------------------------------------
* Functions
/*-----------------------------------------------------------------------
* Functions
@@
-38,13
+38,13
@@
static void flash_get_offsets(ulong base, flash_info_t * info);
unsigned long flash_init(void)
{
unsigned long flash_init(void)
{
- volatile immap_t *immap = (immap_t *) C
FG
_IMMR;
+ volatile immap_t *immap = (immap_t *) C
ONFIG_SYS
_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
unsigned long size;
int i;
/* Init: no FLASHes known */
volatile memctl8xx_t *memctl = &immap->im_memctl;
unsigned long size;
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;
size = flash_get_size((vu_long *) FLASH_BASE0_PRELIM, &flash_info[0]);
flash_info[i].flash_id = FLASH_UNKNOWN;
size = flash_get_size((vu_long *) FLASH_BASE0_PRELIM, &flash_info[0]);
@@
-55,17
+55,17
@@
unsigned long flash_init(void)
}
/* Remap FLASH according to real size */
}
/* Remap FLASH according to real size */
- memctl->memc_or0 = C
FG
_OR_TIMING_FLASH | (-size & 0xFFFF8000);
- memctl->memc_br0 = (C
FG
_FLASH_BASE & BR_BA_MSK) | (memctl->memc_br0 & ~(BR_BA_MSK));
+ memctl->memc_or0 = C
ONFIG_SYS
_OR_TIMING_FLASH | (-size & 0xFFFF8000);
+ memctl->memc_br0 = (C
ONFIG_SYS
_FLASH_BASE & BR_BA_MSK) | (memctl->memc_br0 & ~(BR_BA_MSK));
/* Re-do sizing to get full correct info */
/* Re-do sizing to get full correct info */
- size = flash_get_size((vu_long *) C
FG
_FLASH_BASE, &flash_info[0]);
+ size = flash_get_size((vu_long *) C
ONFIG_SYS
_FLASH_BASE, &flash_info[0]);
- flash_get_offsets(C
FG
_FLASH_BASE, &flash_info[0]);
+ flash_get_offsets(C
ONFIG_SYS
_FLASH_BASE, &flash_info[0]);
/* monitor protection ON by default */
flash_protect(FLAG_PROTECT_SET,
/* monitor protection ON by default */
flash_protect(FLAG_PROTECT_SET,
- C
FG_FLASH_BASE, CFG
_FLASH_BASE + monitor_flash_len - 1,
+ C
ONFIG_SYS_FLASH_BASE, CONFIG_SYS
_FLASH_BASE + monitor_flash_len - 1,
&flash_info[0]);
flash_protect ( FLAG_PROTECT_SET,
&flash_info[0]);
flash_protect ( FLAG_PROTECT_SET,
@@
-425,7
+425,7
@@
int flash_erase(flash_info_t * info, int s_first, int s_last)
last = start;
addr = (vu_char *) (info->start[l_sect]);
while ((addr[0] & 0x80) != 0x80) {
last = start;
addr = (vu_char *) (info->start[l_sect]);
while ((addr[0] & 0x80) != 0x80) {
- if ((now = get_timer(start)) > C
FG
_FLASH_ERASE_TOUT) {
+ if ((now = get_timer(start)) > C
ONFIG_SYS
_FLASH_ERASE_TOUT) {
printf("Timeout\n");
return 1;
}
printf("Timeout\n");
return 1;
}
@@
-498,7
+498,7
@@
static int write_byte(flash_info_t * info, ulong dest, uchar data)
/* data polling for D7 */
start = get_timer(0);
while ((*((vu_char *) dest) & 0x80) != (data & 0x80)) {
/* data polling for D7 */
start = get_timer(0);
while ((*((vu_char *) dest) & 0x80) != (data & 0x80)) {
- if (get_timer(start) > C
FG
_FLASH_WRITE_TOUT) {
+ if (get_timer(start) > C
ONFIG_SYS
_FLASH_WRITE_TOUT) {
return (1);
}
}
return (1);
}
}