summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bbu.h4
-rw-r--r--include/bootm.h4
-rw-r--r--include/driver.h2
-rw-r--r--include/filetype.h1
-rw-r--r--include/image-fit.h25
-rw-r--r--include/image-metadata.h21
-rw-r--r--include/libfile.h2
-rw-r--r--include/linux/reset.h7
-rw-r--r--include/of.h10
-rw-r--r--include/parseopt.h2
-rw-r--r--include/ratp.h2
-rw-r--r--include/ratp_bb.h9
12 files changed, 54 insertions, 35 deletions
diff --git a/include/bbu.h b/include/bbu.h
index 54434b03e0..def568e498 100644
--- a/include/bbu.h
+++ b/include/bbu.h
@@ -11,12 +11,12 @@ struct bbu_data {
#define BBU_FLAG_YES (1 << 1)
unsigned long flags;
int force;
- void *image;
+ const void *image;
const char *imagefile;
const char *devicefile;
size_t len;
const char *handler_name;
- struct imd_header *imd_data;
+ const struct imd_header *imd_data;
};
struct bbu_handler {
diff --git a/include/bootm.h b/include/bootm.h
index 6e9777a9ac..35c18dc276 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -73,6 +73,10 @@ struct image_data {
char *oftree_file;
char *oftree_part;
+ const void *fit_kernel;
+ unsigned long fit_kernel_size;
+ void *fit_config;
+
struct device_node *of_root_node;
struct fdt_header *oftree;
struct resource *oftree_res;
diff --git a/include/driver.h b/include/driver.h
index e571fbbec5..f37805db17 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -475,7 +475,7 @@ struct cdev *cdev_readlink(struct cdev *cdev);
struct cdev *cdev_by_device_node(struct device_node *node);
struct cdev *cdev_by_partuuid(const char *partuuid);
struct cdev *cdev_open(const char *name, unsigned long flags);
-struct cdev *cdev_create_loop(const char *path, ulong flags);
+struct cdev *cdev_create_loop(const char *path, ulong flags, loff_t offset);
void cdev_remove_loop(struct cdev *cdev);
int cdev_do_open(struct cdev *, unsigned long flags);
void cdev_close(struct cdev *cdev);
diff --git a/include/filetype.h b/include/filetype.h
index b98dcb5014..ec5aea2635 100644
--- a/include/filetype.h
+++ b/include/filetype.h
@@ -50,6 +50,7 @@ const char *file_type_to_short_string(enum filetype f);
enum filetype file_detect_partition_table(const void *_buf, size_t bufsize);
enum filetype file_detect_type(const void *_buf, size_t bufsize);
enum filetype file_name_detect_type(const char *filename);
+enum filetype file_name_detect_type_offset(const char *filename, loff_t pos);
enum filetype cdev_detect_type(const char *name);
enum filetype is_fat_or_mbr(const unsigned char *sector, unsigned long *bootsec);
int is_fat_boot_sector(const void *_buf);
diff --git a/include/image-fit.h b/include/image-fit.h
index 62f44dcc8d..fc0883b5dc 100644
--- a/include/image-fit.h
+++ b/include/image-fit.h
@@ -22,29 +22,28 @@
#include <bootm.h>
struct fit_handle {
- void *fit;
+ const void *fit;
+ void *fit_alloc;
size_t size;
bool verbose;
enum bootm_verify verify;
struct device_node *root;
- struct device_node *conf_node;
-
- const void *kernel;
- unsigned long kernel_size;
- const void *oftree;
- unsigned long oftree_size;
- const void *initrd;
- unsigned long initrd_size;
+ struct device_node *images;
+ struct device_node *configurations;
};
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);
+struct fit_handle *fit_open_buf(const void *buf, size_t len, bool verbose,
+ enum bootm_verify verify);
+void *fit_open_configuration(struct fit_handle *handle, const char *name);
+int fit_has_image(struct fit_handle *handle, void *configuration,
+ const char *name);
+int fit_open_image(struct fit_handle *handle, void *configuration,
+ const char *name, const void **outdata,
+ unsigned long *outsize);
void fit_close(struct fit_handle *handle);
diff --git a/include/image-metadata.h b/include/image-metadata.h
index 0ba92469a4..8739bffb92 100644
--- a/include/image-metadata.h
+++ b/include/image-metadata.h
@@ -56,35 +56,36 @@ static inline int imd_type_valid(uint32_t type)
return (type & 0xffff0000) == 0x640c0000;
}
-struct imd_header *imd_next(struct imd_header *imd);
+const struct imd_header *imd_next(const struct imd_header *imd);
#define imd_for_each(start, imd) \
for (imd = imd_next(start); imd_read_type(imd) != IMD_TYPE_END; imd = imd_next(imd))
-static inline uint32_t imd_read_le32(void *_ptr)
+static inline uint32_t imd_read_le32(const void *_ptr)
{
- uint8_t *ptr = _ptr;
+ const uint8_t *ptr = _ptr;
return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24);
}
-static inline uint32_t imd_read_type(struct imd_header *imd)
+static inline uint32_t imd_read_type(const struct imd_header *imd)
{
return imd_read_le32(&imd->type);
}
-static inline uint32_t imd_read_length(struct imd_header *imd)
+static inline uint32_t imd_read_length(const struct imd_header *imd)
{
return imd_read_le32(&imd->datalength);
}
-struct imd_header *imd_find_type(struct imd_header *imd, uint32_t type);
+const struct imd_header *imd_find_type(const struct imd_header *imd,
+ uint32_t type);
-struct imd_header *imd_get(void *buf, int size);
-const char *imd_string_data(struct imd_header *imd, int index);
+const struct imd_header *imd_get(const void *buf, int size);
+const char *imd_string_data(const struct imd_header *imd, int index);
const char *imd_type_to_name(uint32_t type);
-char *imd_concat_strings(struct imd_header *imd);
-const char *imd_get_param(struct imd_header *imd, const char *name);
+char *imd_concat_strings(const struct imd_header *imd);
+const char *imd_get_param(const struct imd_header *imd, const char *name);
extern int imd_command_verbose;
int imd_command_setenv(const char *variable_name, const char *value);
diff --git a/include/libfile.h b/include/libfile.h
index beec7cff79..fd2fadeaa8 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -11,7 +11,7 @@ void *read_file(const char *filename, size_t *size);
int read_file_2(const char *filename, size_t *size, void **outbuf,
loff_t max_size);
-int write_file(const char *filename, void *buf, size_t size);
+int write_file(const char *filename, const void *buf, size_t size);
int copy_file(const char *src, const char *dst, int verbose);
diff --git a/include/linux/reset.h b/include/linux/reset.h
index be0d1bb5a6..a22bcf9a5d 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -37,6 +37,13 @@ static inline int reset_control_deassert(struct reset_control *rstc)
return 0;
}
+static inline struct reset_control *
+reset_control_get(struct device_d *dev, const char *id)
+{
+ WARN_ON(1);
+ return NULL;
+}
+
static inline void reset_control_put(struct reset_control *rstc)
{
WARN_ON(1);
diff --git a/include/of.h b/include/of.h
index 1b9719d603..fec51bb94f 100644
--- a/include/of.h
+++ b/include/of.h
@@ -20,6 +20,7 @@ struct property {
char *name;
int length;
void *value;
+ const void *value_const;
struct list_head list;
};
@@ -100,6 +101,7 @@ void of_print_nodes(struct device_node *node, int indent);
int of_probe(void);
int of_parse_dtb(struct fdt_header *fdt);
struct device_node *of_unflatten_dtb(const void *fdt);
+struct device_node *of_unflatten_dtb_const(const void *infdt);
struct cdev;
@@ -117,6 +119,9 @@ extern int of_set_property(struct device_node *node, const char *p,
const void *val, int len, int create);
extern struct property *of_new_property(struct device_node *node,
const char *name, const void *data, int len);
+extern struct property *of_new_property_const(struct device_node *node,
+ const char *name,
+ const void *data, int len);
extern void of_delete_property(struct property *pp);
extern struct device_node *of_find_node_by_name(struct device_node *from,
@@ -164,7 +169,10 @@ extern int of_get_child_count(const struct device_node *parent);
extern int of_get_available_child_count(const struct device_node *parent);
extern struct device_node *of_get_child_by_name(const struct device_node *node,
const char *name);
-
+extern char *of_get_reproducible_name(struct device_node *node);
+extern struct device_node *of_find_node_by_reproducible_name(struct device_node
+ *from,
+ const char *name);
extern int of_property_read_u32_index(const struct device_node *np,
const char *propname,
u32 index, u32 *out_value);
diff --git a/include/parseopt.h b/include/parseopt.h
index 1f9763f8c9..273a371ac3 100644
--- a/include/parseopt.h
+++ b/include/parseopt.h
@@ -1,5 +1,7 @@
#ifndef __PARSEOPT_H__
#define __PARSEOPT_H__
+void parseopt_llu_suffix(const char *options, const char *opt,
+ unsigned long long *val);
void parseopt_b(const char *options, const char *opt, bool *val);
void parseopt_hu(const char *options, const char *opt, unsigned short *val);
diff --git a/include/ratp.h b/include/ratp.h
index 94fd004f45..6f4cf8a6f5 100644
--- a/include/ratp.h
+++ b/include/ratp.h
@@ -17,6 +17,4 @@ int ratp_poll(struct ratp *ratp);
bool ratp_closed(struct ratp *ratp);
bool ratp_busy(struct ratp *ratp);
-void ratp_run_command(void);
-
#endif /* __RATP_H */ \ No newline at end of file
diff --git a/include/ratp_bb.h b/include/ratp_bb.h
index 52ecaff374..f485f7d8ac 100644
--- a/include/ratp_bb.h
+++ b/include/ratp_bb.h
@@ -2,14 +2,13 @@
#define __RATP_BB_H
struct ratp_bb_pkt {
- struct list_head list;
-
unsigned int len;
uint8_t data[];
};
-int barebox_ratp(struct console_device *cdev);
-int barebox_ratp_fs_call(struct ratp_bb_pkt *tx, struct ratp_bb_pkt **rx);
-int barebox_ratp_fs_mount(const char *path);
+int barebox_ratp(struct console_device *cdev);
+void barebox_ratp_command_run(void);
+int barebox_ratp_fs_call(struct ratp_bb_pkt *tx, struct ratp_bb_pkt **rx);
+int barebox_ratp_fs_mount(const char *path);
#endif /* __RATP_BB_H */