diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-22 09:49:21 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-22 09:49:21 +0100 |
commit | 5ebdae4863f64a32826c25c6e0d1dfbc1612d904 (patch) | |
tree | f7c8ae79050fd00a708bfcda11f6681ebb9a32ce /include | |
parent | 034637fbd9dfc5cbcffca1f8f392c6ab0dd6f229 (diff) | |
parent | 2f9b25f41362e99e2b31684b5c9a1a02abc1ae8b (diff) | |
download | barebox-5ebdae4863f64a32826c25c6e0d1dfbc1612d904.tar.gz barebox-5ebdae4863f64a32826c25c6e0d1dfbc1612d904.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 3 | ||||
-rw-r--r-- | include/image-fit.h | 8 | ||||
-rw-r--r-- | include/linux/kernel.h | 1 | ||||
-rw-r--r-- | include/linux/string.h | 3 | ||||
-rw-r--r-- | include/mci.h | 3 | ||||
-rw-r--r-- | include/of.h | 1 | ||||
-rw-r--r-- | include/parseopt.h | 9 |
7 files changed, 23 insertions, 5 deletions
diff --git a/include/common.h b/include/common.h index dd7445e9b6..60e5005b8e 100644 --- a/include/common.h +++ b/include/common.h @@ -93,8 +93,6 @@ extern int (*barebox_main)(void); void __noreturn start_barebox(void); void shutdown_barebox(void); -#define ALIGN_DOWN(x, a) ((x) & ~((typeof(x))(a) - 1)) - #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) /* @@ -139,6 +137,7 @@ const char *barebox_get_model(void); void barebox_set_model(const char *); const char *barebox_get_hostname(void); void barebox_set_hostname(const char *); +void barebox_set_hostname_no_overwrite(const char *); #if defined(CONFIG_MIPS) #include <asm/addrspace.h> diff --git a/include/image-fit.h b/include/image-fit.h index c49f958268..62f44dcc8d 100644 --- a/include/image-fit.h +++ b/include/image-fit.h @@ -29,6 +29,7 @@ struct fit_handle { enum bootm_verify verify; struct device_node *root; + struct device_node *conf_node; const void *kernel; unsigned long kernel_size; @@ -38,8 +39,13 @@ struct fit_handle { unsigned long initrd_size; }; -struct fit_handle *fit_open(const char *filename, const char *config, bool verbose, +struct fit_handle *fit_open(const char *filename, bool verbose, enum bootm_verify verify); +int fit_open_configuration(struct fit_handle *handle, const char *name); +int fit_has_image(struct fit_handle *handle, const char *name); +int fit_open_image(struct fit_handle *handle, const char *name, + const void **outdata, unsigned long *outsize); + void fit_close(struct fit_handle *handle); #endif /* __IMAGE_FIT_H__ */ diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b4d2f09081..ab713f20e9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -33,6 +33,7 @@ #define S64_MIN ((s64)(-S64_MAX - 1)) #define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1) +#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a)) #define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) diff --git a/include/linux/string.h b/include/linux/string.h index 5df8c50e57..ed4eeb5519 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -80,6 +80,9 @@ extern __kernel_size_t strnlen(const char *,__kernel_size_t); #ifndef __HAVE_ARCH_STRDUP extern char * strdup(const char *); #endif +#ifndef __HAVE_ARCH_STRNDUP +extern char *strndup(const char *, size_t); +#endif #ifndef __HAVE_ARCH_STRSWAB extern char * strswab(const char *); #endif diff --git a/include/mci.h b/include/mci.h index 1f6533391a..072008ef9d 100644 --- a/include/mci.h +++ b/include/mci.h @@ -478,8 +478,7 @@ void mci_of_parse(struct mci_host *host); void mci_of_parse_node(struct mci_host *host, struct device_node *np); int mci_detect_card(struct mci_host *); int mci_send_ext_csd(struct mci *mci, char *ext_csd); -int mci_switch(struct mci *mci, unsigned set, unsigned index, - unsigned value); +int mci_switch(struct mci *mci, unsigned index, unsigned value); static inline int mmc_host_is_spi(struct mci_host *host) { diff --git a/include/of.h b/include/of.h index 9bdbbb5ed2..1b9719d603 100644 --- a/include/of.h +++ b/include/of.h @@ -148,6 +148,7 @@ extern struct device_node *of_copy_node(struct device_node *parent, const struct device_node *other); extern void of_delete_node(struct device_node *node); +extern const char *of_get_machine_compatible(void); extern int of_machine_is_compatible(const char *compat); extern int of_device_is_compatible(const struct device_node *device, const char *compat); diff --git a/include/parseopt.h b/include/parseopt.h new file mode 100644 index 0000000000..1f9763f8c9 --- /dev/null +++ b/include/parseopt.h @@ -0,0 +1,9 @@ +#ifndef __PARSEOPT_H__ +#define __PARSEOPT_H__ + +void parseopt_b(const char *options, const char *opt, bool *val); +void parseopt_hu(const char *options, const char *opt, unsigned short *val); +void parseopt_u16(const char *options, const char *opt, uint16_t *val); +void parseopt_str(const char *options, const char *opt, char **val); + +#endif /* __PARSEOPT_H__ */ |