2 * Copyright (C) 2018 Synopsys, Inc. All rights reserved.
3 * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __BOARD_ENV_LIB_H
9 #define __BOARD_ENV_LIB_H
13 #include <linux/kernel.h>
25 struct env_map_common {
26 const char *const env_name;
34 struct env_map_percpu {
35 const char *const env_name;
40 u32_env (*val)[NR_CPUS];
43 void envs_cleanup_common(const struct env_map_common *map);
44 int envs_read_common(const struct env_map_common *map);
45 int envs_validate_common(const struct env_map_common *map);
46 int envs_read_validate_common(const struct env_map_common *map);
48 void envs_cleanup_core(const struct env_map_percpu *map);
49 int envs_read_validate_core(const struct env_map_percpu *map,
50 bool (*cpu_used)(u32));
51 int envs_process_and_validate(const struct env_map_common *common,
52 const struct env_map_percpu *core,
53 bool (*cpu_used)(u32));
55 int args_envs_enumerate(const struct env_map_common *map,
56 int enum_by, int argc, char *const argv[]);
58 #endif /* __BOARD_ENV_LIB_H */