projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
export SPI functions to standalone apps
[oweals/u-boot.git]
/
board
/
oxc
/
flash.c
diff --git
a/board/oxc/flash.c
b/board/oxc/flash.c
index 94d2660e1d756241a4ecc9fbebb0126e24a364ea..36e0fcac790dca5ff7f55049d92e849f46e9a138 100644
(file)
--- a/
board/oxc/flash.c
+++ b/
board/oxc/flash.c
@@
-31,7
+31,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
@@
-49,7
+49,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;
}
@@
-59,17
+59,17
@@
unsigned long flash_init (void)
* and the size of flash using 0xFF800000 as the base address,
* and then call flash_get_size() again to fill flash_info.
*/
* and the size of flash using 0xFF800000 as the base address,
* and then call flash_get_size() again to fill flash_info.
*/
- size = flash_get_size((vu_char *)C
FG
_FLASH_PRELIMBASE, &flash_info[0]);
+ size = flash_get_size((vu_char *)C
ONFIG_SYS
_FLASH_PRELIMBASE, &flash_info[0]);
if (size)
{
flash_get_size((vu_char *)(-size), &flash_info[0]);
}
if (size)
{
flash_get_size((vu_char *)(-size), &flash_info[0]);
}
-#if (C
FG_MONITOR_BASE >= CFG
_FLASH_PRELIMBASE)
+#if (C
ONFIG_SYS_MONITOR_BASE >= CONFIG_SYS
_FLASH_PRELIMBASE)
/* 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
@@
-286,7
+286,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;
}
@@
-361,7
+361,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);
}
}