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
12 #include <linux/kernel.h>
24 struct env_map_common {
25 const char *const env_name;
33 struct env_map_percpu {
34 const char *const env_name;
39 u32_env (*val)[NR_CPUS];
42 void envs_cleanup_common(const struct env_map_common *map);
43 int envs_read_common(const struct env_map_common *map);
44 int envs_validate_common(const struct env_map_common *map);
45 int envs_read_validate_common(const struct env_map_common *map);
47 void envs_cleanup_core(const struct env_map_percpu *map);
48 int envs_read_validate_core(const struct env_map_percpu *map,
49 bool (*cpu_used)(u32));
50 int envs_process_and_validate(const struct env_map_common *common,
51 const struct env_map_percpu *core,
52 bool (*cpu_used)(u32));
54 int args_envs_enumerate(const struct env_map_common *map,
55 int enum_by, int argc, char *const argv[]);
57 #endif /* __BOARD_ENV_LIB_H */