summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-12-11 13:31:14 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-12-11 13:31:14 +0100
commitb33e3e0f99946260200a43e783488416eeed112a (patch)
tree9f48d7f56344d98b0e6abc7b34c0fda0e19cb5be /include
parent2d525e7ee0a8059881e725db7d3f1d8ebb5e63f5 (diff)
parent8bc9efc85b8af8a23a0c86b04e2265730a220ade (diff)
downloadbarebox-b33e3e0f99946260200a43e783488416eeed112a.tar.gz
barebox-b33e3e0f99946260200a43e783488416eeed112a.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'include')
-rw-r--r--include/boot.h3
-rw-r--r--include/command.h1
-rw-r--r--include/environment.h5
-rw-r--r--include/linux/mod_devicetable.h2
-rw-r--r--include/of.h8
-rw-r--r--include/string.h1
-rw-r--r--include/watchdog.h8
7 files changed, 27 insertions, 1 deletions
diff --git a/include/boot.h b/include/boot.h
index 4054c27d93..3d5dd1cb6e 100644
--- a/include/boot.h
+++ b/include/boot.h
@@ -42,7 +42,10 @@ int bootentry_register_provider(int (*fn)(struct bootentries *bootentries, const
#define bootentries_for_each_entry(bootentries, entry) \
list_for_each_entry(entry, &bootentries->entries, list)
+struct watchdog;
+
void boot_set_watchdog_timeout(unsigned int timeout);
+struct watchdog *boot_get_enabled_watchdog(void);
struct bootentries *bootentries_alloc(void);
void bootentries_free(struct bootentries *bootentries);
int bootentry_create_from_name(struct bootentries *bootentries,
diff --git a/include/command.h b/include/command.h
index 860eae3e35..ccae568f87 100644
--- a/include/command.h
+++ b/include/command.h
@@ -13,6 +13,7 @@
#include <linux/list.h>
#include <linux/stringify.h>
#include <linux/stddef.h>
+#include <string.h>
#ifndef __ASSEMBLY__
diff --git a/include/environment.h b/include/environment.h
index 9488e4e1ac..19e522cfb6 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -87,6 +87,11 @@ int env_push_context(void);
int export(const char *);
+static inline int unsetenv(const char *var)
+{
+ return setenv(var, NULL);
+}
+
#endif /* _ENVIRONMENT_H_ */
/**
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 1fbb3dc5c1..2c04454260 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -21,7 +21,7 @@ struct pci_device_id {
#define SPI_NAME_SIZE 32
struct spi_device_id {
- char name[SPI_NAME_SIZE];
+ const char *name;
unsigned long driver_data;
};
diff --git a/include/of.h b/include/of.h
index 08a02e1105..6181da8c61 100644
--- a/include/of.h
+++ b/include/of.h
@@ -254,6 +254,8 @@ extern int of_count_phandle_with_args(const struct device_node *np,
extern void of_alias_scan(void);
extern int of_alias_get_id(struct device_node *np, const char *stem);
+extern int of_alias_get_id_from(struct device_node *root, struct device_node *np,
+ const char *stem);
extern const char *of_alias_get(struct device_node *np);
extern int of_modalias_node(struct device_node *node, char *modalias, int len);
@@ -677,6 +679,12 @@ static inline int of_alias_get_id(struct device_node *np, const char *stem)
return -ENOSYS;
}
+static inline int of_alias_get_id_from(struct device_node *root, struct device_node *np,
+ const char *stem)
+{
+ return -ENOSYS;
+}
+
static inline const char *of_alias_get(struct device_node *np)
{
return NULL;
diff --git a/include/string.h b/include/string.h
index b51566fd00..ef0b5e199e 100644
--- a/include/string.h
+++ b/include/string.h
@@ -14,5 +14,6 @@ void *__nokasan_default_memset(void *, int, __kernel_size_t);
void *__default_memcpy(void * dest,const void *src,size_t count);
void *__nokasan_default_memcpy(void * dest,const void *src,size_t count);
+char *parse_assignment(char *str);
#endif /* __STRING_H */
diff --git a/include/watchdog.h b/include/watchdog.h
index 81414ef8ec..4d755a5a79 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -13,6 +13,8 @@ enum wdog_hw_runnning {
WDOG_HW_NOT_RUNNING = PARAM_TRISTATE_FALSE
};
+struct device_node;
+
struct watchdog {
int (*set_timeout)(struct watchdog *, unsigned);
const char *name;
@@ -44,6 +46,7 @@ int watchdog_register(struct watchdog *);
int watchdog_deregister(struct watchdog *);
struct watchdog *watchdog_get_default(void);
struct watchdog *watchdog_get_by_name(const char *name);
+int watchdog_get_alias_id_from(struct watchdog *, struct device_node *);
int watchdog_set_timeout(struct watchdog*, unsigned);
int watchdog_inhibit_all(void);
#else
@@ -76,6 +79,11 @@ static inline int watchdog_inhibit_all(void)
{
return -ENOSYS;
}
+
+static inline int watchdog_get_alias_id_from(struct watchdog *wd, struct device_node *np)
+{
+ return -ENOSYS;
+}
#endif
#define WATCHDOG_DEFAULT_PRIORITY 100