summaryrefslogtreecommitdiff
path: root/common/env_sf.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-09-10 22:48:06 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-09-10 22:48:06 +0200
commit0e8d158664a913392cb01fb11a948d83f72e105e (patch)
tree9e0a45c86828b4549b77c7867320e867401d9c86 /common/env_sf.c
parent1ede78710c3bf9ad6f4a53aaddc3bcc86fedd9df (diff)
rename CFG_ENV macros to CONFIG_ENV
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'common/env_sf.c')
-rw-r--r--common/env_sf.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/common/env_sf.c b/common/env_sf.c
index faf62608b4d..1bbf93fdfa4 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -29,17 +29,17 @@
#include <environment.h>
#include <spi_flash.h>
-#ifndef CFG_ENV_SPI_BUS
-# define CFG_ENV_SPI_BUS 0
+#ifndef CONFIG_ENV_SPI_BUS
+# define CONFIG_ENV_SPI_BUS 0
#endif
-#ifndef CFG_ENV_SPI_CS
-# define CFG_ENV_SPI_CS 0
+#ifndef CONFIG_ENV_SPI_CS
+# define CONFIG_ENV_SPI_CS 0
#endif
-#ifndef CFG_ENV_SPI_MAX_HZ
-# define CFG_ENV_SPI_MAX_HZ 1000000
+#ifndef CONFIG_ENV_SPI_MAX_HZ
+# define CONFIG_ENV_SPI_MAX_HZ 1000000
#endif
-#ifndef CFG_ENV_SPI_MODE
-# define CFG_ENV_SPI_MODE SPI_MODE_3
+#ifndef CONFIG_ENV_SPI_MODE
+# define CONFIG_ENV_SPI_MODE SPI_MODE_3
#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -67,18 +67,18 @@ int saveenv(void)
return 1;
}
- if (CFG_ENV_SIZE > CFG_ENV_SECT_SIZE) {
- sector = CFG_ENV_SIZE / CFG_ENV_SECT_SIZE;
- if (CFG_ENV_SIZE % CFG_ENV_SECT_SIZE)
+ if (CONFIG_ENV_SIZE > CONFIG_ENV_SECT_SIZE) {
+ sector = CONFIG_ENV_SIZE / CONFIG_ENV_SECT_SIZE;
+ if (CONFIG_ENV_SIZE % CONFIG_ENV_SECT_SIZE)
sector++;
}
puts("Erasing SPI flash...");
- if (spi_flash_erase(env_flash, CFG_ENV_OFFSET, sector * CFG_ENV_SECT_SIZE))
+ if (spi_flash_erase(env_flash, CONFIG_ENV_OFFSET, sector * CONFIG_ENV_SECT_SIZE))
return 1;
puts("Writing to SPI flash...");
- if (spi_flash_write(env_flash, CFG_ENV_OFFSET, CFG_ENV_SIZE, env_ptr))
+ if (spi_flash_write(env_flash, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, env_ptr))
return 1;
puts("done\n");
@@ -89,12 +89,12 @@ void env_relocate_spec(void)
{
int ret;
- env_flash = spi_flash_probe(CFG_ENV_SPI_BUS, CFG_ENV_SPI_CS,
- CFG_ENV_SPI_MAX_HZ, CFG_ENV_SPI_MODE);
+ env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
+ CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
if (!env_flash)
goto err_probe;
- ret = spi_flash_read(env_flash, CFG_ENV_OFFSET, CFG_ENV_SIZE, env_ptr);
+ ret = spi_flash_read(env_flash, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, env_ptr);
if (ret)
goto err_read;
@@ -112,7 +112,7 @@ err_probe:
err_crc:
puts("*** Warning - bad CRC, using default environment\n\n");
- if (default_environment_size > CFG_ENV_SIZE) {
+ if (default_environment_size > CONFIG_ENV_SIZE) {
gd->env_valid = 0;
puts("*** Error - default environment is too large\n\n");
return;