X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fenvironment.h;h=cd966761416e0456f3dc79abed3afa0b28ce32e8;hb=f643fb9f4c8fc5c5dceb8c2c2893447d18413d77;hp=6044b9e1b463e84c9bc20e7f1e8eac59fbc46168;hpb=31f044bd91df58bed6bb8cfadfc187eedac1442e;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/environment.h b/include/environment.h index 6044b9e..cd96676 100644 --- a/include/environment.h +++ b/include/environment.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2002 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef _ENVIRONMENT_H_ @@ -158,21 +157,11 @@ extern env_t environment; #endif /* ENV_IS_EMBEDDED */ extern const unsigned char default_environment[]; -extern env_t *env_ptr; #if defined(CONFIG_NEEDS_MANUAL_RELOC) extern void env_reloc(void); #endif -#ifdef CONFIG_ENV_IS_IN_MMC -#include - -extern int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr); -# ifdef CONFIG_SYS_MMC_ENV_PART -extern uint mmc_get_env_part(struct mmc *mmc); -# endif -#endif - #ifndef DO_DEPS_ONLY #include @@ -188,6 +177,7 @@ enum env_valid { }; enum env_location { + ENVL_UNKNOWN, ENVL_EEPROM, ENVL_EXT4, ENVL_FAT, @@ -202,7 +192,6 @@ enum env_location { ENVL_NOWHERE, ENVL_COUNT, - ENVL_UNKNOWN, }; /* value for the various operations we want to perform on the env */ @@ -218,17 +207,6 @@ struct env_driver { enum env_location location; /** - * get_char() - Read a character from the environment - * - * This method is optional. If not provided, a default implementation - * will read from gd->env_addr. - * - * @index: Index of character to read (0=first) - * @return character read, or -ve on error - */ - int (*get_char)(int index); - - /** * load() - Load the environment from storage * * This method is optional. If not provided, no environment will be @@ -284,10 +262,10 @@ void env_crc_update(void); char *env_get_default(const char *name); /* [re]set to the default environment */ -void set_default_env(const char *s); +void set_default_env(const char *s, int flags); /* [re]set individual variables to their value in the default environment */ -int set_default_vars(int nvars, char * const vars[]); +int set_default_vars(int nvars, char * const vars[], int flags); /* Import from binary representation into hash table */ int env_import(const char *buf, int check); @@ -304,7 +282,7 @@ int env_import_redund(const char *buf1, int buf1_status, /** * env_get_char() - Get a character from the early environment * - * This reads from the pre-relocation environemnt + * This reads from the pre-relocation environment * * @index: Index of character to read (0 = first) * @return character read, or -ve on error @@ -325,6 +303,15 @@ int env_load(void); */ int env_save(void); +/** + * env_fix_drivers() - Updates envdriver as per relocation + */ +void env_fix_drivers(void); + +void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); +int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); +int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr); + #endif /* DO_DEPS_ONLY */ #endif /* _ENVIRONMENT_H_ */