#include <common.h>
#include <ahci.h>
+#include <environment.h>
#include <spl.h>
#include <asm/omap_common.h>
#include <asm/arch/omap.h>
{
printf("Setting reboot to fastboot flag ...\n");
setenv("dofastboot", "1");
- saveenv();
+ env_save();
return 0;
}
#endif
*/
#include <common.h>
#include <dwc3-uboot.h>
+#include <environment.h>
#include <mmc.h>
#include <u-boot/md5.h>
#include <usb.h>
setenv("serial#", serial);
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
- saveenv();
+ env_save();
#endif
}
setenv("hardware_id", hardware_id);
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
- saveenv();
+ env_save();
#endif
}
#include <command.h>
#include <common.h>
#include <dm.h>
+#include <environment.h>
#include <asm/io.h>
#include <asm/arch/at91sam9260_matrix.h>
#include <asm/arch/at91sam9_smc.h>
setenv("bootargs", '\0');
setenv("upgrade_available", '\0');
setenv("boot_retries", '\0');
- saveenv();
+ env_save();
return 0;
}
boot_retry++;
sprintf(boot_buf, "%lx", boot_retry);
setenv("boot_retries", boot_buf);
- saveenv();
+ env_save();
/*
* Here the boot_retries count is checked, and if the
#include <common.h>
#include <dm.h>
+#include <environment.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/mxc_hdmi.h>
setenv("fdt_file", FDT_FILE_V1_0);
printf("patching fdt_file to " FDT_FILE_V1_0 "\n");
#ifndef CONFIG_ENV_IS_NOWHERE
- saveenv();
+ env_save();
#endif
}
}
printf("Saving Environment to %s...\n", env->name);
- return saveenv() ? 1 : 0;
+ return env_save() ? 1 : 0;
}
U_BOOT_CMD(
*/
#include <common.h>
+#include <environment.h>
void bootcount_store(ulong a)
{
if (upgrade_available) {
setenv_ulong("bootcount", a);
- saveenv();
+ env_save();
}
}
return 0;
}
-
-int saveenv(void)
-{
- return env_save();
-}
-
* Return -1 if variable does not exist (default to true)
*/
int getenv_yesno(const char *var);
-int saveenv (void);
int setenv (const char *, const char *);
int setenv_ulong(const char *varname, ulong value);
int setenv_hex(const char *varname, ulong value);
*/
int env_load(void);
+/**
+ * env_save() - Save the environment to storage
+ *
+ * @return 0 if OK, -ve on error
+ */
+int env_save(void);
+
#endif /* DO_DEPS_ONLY */
#endif /* _ENVIRONMENT_H_ */