X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fenvironment.h;h=70b7eda428b660ca0ed72e7c81b152b80e876b3e;hb=979b239b4c5f2fb7b219cc1d10445e136016a8f8;hp=a4060506fabb543ab291feb394c8059c8c1454aa;hpb=f95a4b3a5518818c831f1136053f9b2366018d0b;p=u-boot diff --git a/include/environment.h b/include/environment.h index a4060506fa..70b7eda428 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_ @@ -188,6 +187,7 @@ enum env_valid { }; enum env_location { + ENVL_UNKNOWN, ENVL_EEPROM, ENVL_EXT4, ENVL_FAT, @@ -202,7 +202,6 @@ enum env_location { ENVL_NOWHERE, ENVL_COUNT, - ENVL_UNKNOWN, }; /* value for the various operations we want to perform on the env */ @@ -217,17 +216,6 @@ struct env_driver { const char *name; 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 * @@ -297,13 +285,14 @@ int env_export(env_t *env_out); #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT /* Select and import one of two redundant environments */ -int env_import_redund(const char *buf1, const char *buf2); +int env_import_redund(const char *buf1, int buf1_status, + const char *buf2, int buf2_status); #endif /** * 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 @@ -324,6 +313,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_ */