1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Joe Hershberger, National Instruments, joe.hershberger@ni.com
7 #ifndef __ENV_CALLBACK_H__
8 #define __ENV_CALLBACK_H__
11 #include <env_flags.h>
12 #include <linker_lists.h>
15 #define ENV_CALLBACK_VAR ".callbacks"
17 /* Board configs can define additional static callback bindings */
18 #ifndef CFG_ENV_CALLBACK_LIST_STATIC
19 #define CFG_ENV_CALLBACK_LIST_STATIC
22 #ifdef CONFIG_SILENT_CONSOLE
23 #define SILENT_CALLBACK "silent:silent,"
25 #define SILENT_CALLBACK
29 #define ENV_DOT_ESCAPE "\\"
31 #define ENV_DOT_ESCAPE
35 #define DNS_CALLBACK "dnsip:dnsip,"
41 #define NET_CALLBACKS \
42 "bootfile:bootfile," \
44 "gatewayip:gatewayip," \
46 "serverip:serverip," \
50 "eth" ETHADDR_WILDCARD "addr:ethaddr,"
56 #define NET6_CALLBACKS \
58 "serverip6:serverip6," \
59 "gatewayip6:gatewayip6,"
61 #define NET6_CALLBACKS
64 #ifdef CONFIG_BOOTSTD_FULL
65 #define BOOTSTD_CALLBACK \
66 "bootmeths:bootmeths," \
69 #define BOOTSTD_CALLBACK
73 #define DFU_CALLBACK "dfu_alt_info:dfu_alt_info,"
79 * This list of callback bindings is static, but may be overridden by defining
80 * a new association in the ".callbacks" environment variable.
82 #define ENV_CALLBACK_LIST_STATIC ENV_DOT_ESCAPE ENV_CALLBACK_VAR ":callbacks," \
83 ENV_DOT_ESCAPE ENV_FLAGS_VAR ":flags," \
84 "baudrate:baudrate," \
89 "loadaddr:loadaddr," \
91 "stdin:console,stdout:console,stderr:console," \
93 CFG_ENV_CALLBACK_LIST_STATIC
95 #ifndef CONFIG_XPL_BUILD
96 void env_callback_init(struct env_entry
*var_entry
);
98 static inline void env_callback_init(struct env_entry
*var_entry
)
103 #endif /* __ENV_CALLBACK_H__ */