]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - board/synopsys/hsdk/env-lib.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2018 Synopsys, Inc. All rights reserved.
4 * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
7 #ifndef __BOARD_ENV_LIB_H
8 #define __BOARD_ENV_LIB_H
11 #include <linux/kernel.h>
23 struct env_map_common
{
24 const char *const env_name
;
32 struct env_map_percpu
{
33 const char *const env_name
;
38 u32_env (*val
)[NR_CPUS
];
41 void envs_cleanup_common(const struct env_map_common
*map
);
42 int envs_read_common(const struct env_map_common
*map
);
43 int envs_validate_common(const struct env_map_common
*map
);
44 int envs_read_validate_common(const struct env_map_common
*map
);
46 void envs_cleanup_core(const struct env_map_percpu
*map
);
47 int envs_read_validate_core(const struct env_map_percpu
*map
,
48 bool (*cpu_used
)(u32
));
49 int envs_process_and_validate(const struct env_map_common
*common
,
50 const struct env_map_percpu
*core
,
51 bool (*cpu_used
)(u32
));
53 int args_envs_enumerate(const struct env_map_common
*map
,
54 int enum_by
, int argc
, char *const argv
[]);
56 #endif /* __BOARD_ENV_LIB_H */