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_ENV macros to CONFIG_ENV
[platform/kernel/u-boot.git]
/
common
/
env_sf.c
diff --git
a/common/env_sf.c
b/common/env_sf.c
index
faf6260
..
1bbf93f
100644
(file)
--- a/
common/env_sf.c
+++ b/
common/env_sf.c
@@
-29,17
+29,17
@@
#include <environment.h>
#include <spi_flash.h>
#include <environment.h>
#include <spi_flash.h>
-#ifndef C
F
G_ENV_SPI_BUS
-# define C
FG_ENV_SPI_BUS
0
+#ifndef C
ONFI
G_ENV_SPI_BUS
+# define C
ONFIG_ENV_SPI_BUS
0
#endif
#endif
-#ifndef C
F
G_ENV_SPI_CS
-# define C
FG_ENV_SPI_CS
0
+#ifndef C
ONFI
G_ENV_SPI_CS
+# define C
ONFIG_ENV_SPI_CS
0
#endif
#endif
-#ifndef C
F
G_ENV_SPI_MAX_HZ
-# define C
FG_ENV_SPI_MAX_HZ
1000000
+#ifndef C
ONFI
G_ENV_SPI_MAX_HZ
+# define C
ONFIG_ENV_SPI_MAX_HZ
1000000
#endif
#endif
-#ifndef C
F
G_ENV_SPI_MODE
-# define C
FG_ENV_SPI_MODE
SPI_MODE_3
+#ifndef C
ONFI
G_ENV_SPI_MODE
+# define C
ONFIG_ENV_SPI_MODE
SPI_MODE_3
#endif
DECLARE_GLOBAL_DATA_PTR;
#endif
DECLARE_GLOBAL_DATA_PTR;
@@
-67,18
+67,18
@@
int saveenv(void)
return 1;
}
return 1;
}
- if (C
FG_ENV_SIZE > CF
G_ENV_SECT_SIZE) {
- sector = C
FG_ENV_SIZE / CF
G_ENV_SECT_SIZE;
- if (C
FG_ENV_SIZE % CF
G_ENV_SECT_SIZE)
+ if (C
ONFIG_ENV_SIZE > CONFI
G_ENV_SECT_SIZE) {
+ sector = C
ONFIG_ENV_SIZE / CONFI
G_ENV_SECT_SIZE;
+ if (C
ONFIG_ENV_SIZE % CONFI
G_ENV_SECT_SIZE)
sector++;
}
puts("Erasing SPI flash...");
sector++;
}
puts("Erasing SPI flash...");
- if (spi_flash_erase(env_flash, C
FG_ENV_OFFSET, sector * CF
G_ENV_SECT_SIZE))
+ if (spi_flash_erase(env_flash, C
ONFIG_ENV_OFFSET, sector * CONFI
G_ENV_SECT_SIZE))
return 1;
puts("Writing to SPI flash...");
return 1;
puts("Writing to SPI flash...");
- if (spi_flash_write(env_flash, C
FG_ENV_OFFSET, CF
G_ENV_SIZE, env_ptr))
+ if (spi_flash_write(env_flash, C
ONFIG_ENV_OFFSET, CONFI
G_ENV_SIZE, env_ptr))
return 1;
puts("done\n");
return 1;
puts("done\n");
@@
-89,12
+89,12
@@
void env_relocate_spec(void)
{
int ret;
{
int ret;
- env_flash = spi_flash_probe(C
FG_ENV_SPI_BUS, CF
G_ENV_SPI_CS,
- C
FG_ENV_SPI_MAX_HZ, CF
G_ENV_SPI_MODE);
+ env_flash = spi_flash_probe(C
ONFIG_ENV_SPI_BUS, CONFI
G_ENV_SPI_CS,
+ C
ONFIG_ENV_SPI_MAX_HZ, CONFI
G_ENV_SPI_MODE);
if (!env_flash)
goto err_probe;
if (!env_flash)
goto err_probe;
- ret = spi_flash_read(env_flash, C
FG_ENV_OFFSET, CF
G_ENV_SIZE, env_ptr);
+ ret = spi_flash_read(env_flash, C
ONFIG_ENV_OFFSET, CONFI
G_ENV_SIZE, env_ptr);
if (ret)
goto err_read;
if (ret)
goto err_read;
@@
-112,7
+112,7
@@
err_probe:
err_crc:
puts("*** Warning - bad CRC, using default environment\n\n");
err_crc:
puts("*** Warning - bad CRC, using default environment\n\n");
- if (default_environment_size > C
F
G_ENV_SIZE) {
+ if (default_environment_size > C
ONFI
G_ENV_SIZE) {
gd->env_valid = 0;
puts("*** Error - default environment is too large\n\n");
return;
gd->env_valid = 0;
puts("*** Error - default environment is too large\n\n");
return;