Blame view
include/env_callback.h
2.34 KB
83d290c56 SPDX: Convert all... |
1 |
/* SPDX-License-Identifier: GPL-2.0+ */ |
170ab1107 env: Add support ... |
2 3 4 |
/* * (C) Copyright 2012 * Joe Hershberger, National Instruments, joe.hershberger@ni.com |
170ab1107 env: Add support ... |
5 6 7 8 |
*/ #ifndef __ENV_CALLBACK_H__ #define __ENV_CALLBACK_H__ |
2598090b7 env: Add environm... |
9 |
#include <env_flags.h> |
170ab1107 env: Add support ... |
10 11 12 13 14 15 16 17 18 |
#include <linker_lists.h> #include <search.h> #define ENV_CALLBACK_VAR ".callbacks" /* Board configs can define additional static callback bindings */ #ifndef CONFIG_ENV_CALLBACK_LIST_STATIC #define CONFIG_ENV_CALLBACK_LIST_STATIC #endif |
e080d545f env: Add a silent... |
19 20 21 22 23 |
#ifdef CONFIG_SILENT_CONSOLE #define SILENT_CALLBACK "silent:silent," #else #define SILENT_CALLBACK #endif |
c08804853 lcd: implement a ... |
24 25 26 27 28 |
#ifdef CONFIG_SPLASHIMAGE_GUARD #define SPLASHIMAGE_CALLBACK "splashimage:splashimage," #else #define SPLASHIMAGE_CALLBACK #endif |
bdf1fe4e6 env: Add regex su... |
29 30 31 32 33 |
#ifdef CONFIG_REGEX #define ENV_DOT_ESCAPE "\\" #else #define ENV_DOT_ESCAPE #endif |
fd3056337 net: Use env call... |
34 35 36 37 38 |
#ifdef CONFIG_CMD_DNS #define DNS_CALLBACK "dnsip:dnsip," #else #define DNS_CALLBACK #endif |
3b3ea2c56 Kconfig: cmd: Mak... |
39 |
#ifdef CONFIG_CMD_NET |
fd3056337 net: Use env call... |
40 41 42 43 44 45 46 47 |
#define NET_CALLBACKS \ "bootfile:bootfile," \ "ipaddr:ipaddr," \ "gatewayip:gatewayip," \ "netmask:netmask," \ "serverip:serverip," \ "nvlan:nvlan," \ "vlan:vlan," \ |
6e0d26c05 net: Handle ethad... |
48 |
DNS_CALLBACK \ |
f7848d90d Allow CONFIG_REGE... |
49 |
"eth" ETHADDR_WILDCARD "addr:ethaddr," |
fd3056337 net: Use env call... |
50 51 52 |
#else #define NET_CALLBACKS #endif |
170ab1107 env: Add support ... |
53 54 55 56 |
/* * This list of callback bindings is static, but may be overridden by defining * a new association in the ".callbacks" environment variable. */ |
bdf1fe4e6 env: Add regex su... |
57 58 |
#define ENV_CALLBACK_LIST_STATIC ENV_DOT_ESCAPE ENV_CALLBACK_VAR ":callbacks," \ ENV_DOT_ESCAPE ENV_FLAGS_VAR ":flags," \ |
32057717e env: Add a baudra... |
59 |
"baudrate:baudrate," \ |
fd3056337 net: Use env call... |
60 |
NET_CALLBACKS \ |
1cf0a8b2f env: Add a loadad... |
61 |
"loadaddr:loadaddr," \ |
e080d545f env: Add a silent... |
62 |
SILENT_CALLBACK \ |
c08804853 lcd: implement a ... |
63 |
SPLASHIMAGE_CALLBACK \ |
849d5d9cd env: Add a consol... |
64 |
"stdin:console,stdout:console,stderr:console," \ |
de4e4edaf usb: gadget: g_dn... |
65 |
"serial#:serialno," \ |
170ab1107 env: Add support ... |
66 67 68 69 70 71 72 |
CONFIG_ENV_CALLBACK_LIST_STATIC struct env_clbk_tbl { const char *name; /* Callback name */ int (*callback)(const char *name, const char *value, enum env_op op, int flags); }; |
170ab1107 env: Add support ... |
73 74 75 76 77 78 79 |
void env_callback_init(ENTRY *var_entry); /* * Define a callback that can be associated with variables. * when associated through the ".callbacks" environment variable, the callback * will be executed any time the variable is inserted, overwritten, or deleted. */ |
f8cfcf1b1 env: don't genera... |
80 81 |
#ifdef CONFIG_SPL_BUILD #define U_BOOT_ENV_CALLBACK(name, callback) \ |
3ea664c7c env_callback.h: s... |
82 |
static inline __maybe_unused void _u_boot_env_noop_##name(void) \ |
f8cfcf1b1 env: don't genera... |
83 84 85 86 |
{ \ (void)callback; \ } #else |
170ab1107 env: Add support ... |
87 |
#define U_BOOT_ENV_CALLBACK(name, callback) \ |
ef123c525 Refactor linker-g... |
88 |
ll_entry_declare(struct env_clbk_tbl, name, env_clbk) = \ |
170ab1107 env: Add support ... |
89 |
{#name, callback} |
f8cfcf1b1 env: don't genera... |
90 |
#endif |
170ab1107 env: Add support ... |
91 92 |
#endif /* __ENV_CALLBACK_H__ */ |