diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-06 08:33:43 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-06 08:33:43 +0100 |
commit | 0e055c254c3eab40b52b3ac5f845a889bd281e05 (patch) | |
tree | 4f849bb3d50194ebc091b8be25b1b5072d73d063 /include | |
parent | 9524e7d0d7d22fbc9bde4fcebc7eeb6a12763c12 (diff) | |
parent | fba2adcb3d50e86d4e26da9126c1ef6424e348e6 (diff) | |
download | barebox-0e055c254c3eab40b52b3ac5f845a889bd281e05.tar.gz barebox-0e055c254c3eab40b52b3ac5f845a889bd281e05.tar.xz |
Merge branch 'for-next/mtd-partitions'
Diffstat (limited to 'include')
-rw-r--r-- | include/cmdlinepart.h | 14 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 5 | ||||
-rw-r--r-- | include/nand.h | 7 | ||||
-rw-r--r-- | include/of.h | 2 |
4 files changed, 26 insertions, 2 deletions
diff --git a/include/cmdlinepart.h b/include/cmdlinepart.h new file mode 100644 index 0000000000..bf8cdfa62a --- /dev/null +++ b/include/cmdlinepart.h @@ -0,0 +1,14 @@ +#ifndef __CMD_LINE_PART_H +#define __CMD_LINE_PART_H + +#define CMDLINEPART_ADD_DEVNAME (1 << 0) + +int cmdlinepart_do_parse_one(const char *devname, const char *partstr, + const char **endp, loff_t *offset, + loff_t devsize, loff_t *retsize, + unsigned int partition_flags); + +int cmdlinepart_do_parse(const char *devname, const char *parts, loff_t devsize, + unsigned partition_flags); + +#endif /* __CMD_LINE_PART_H */ diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 1d33592fef..33f1fd512d 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -220,6 +220,11 @@ struct mtd_info { struct mtd_info *master; loff_t master_offset; + + struct list_head partitions; + struct list_head partitions_entry; + + char *of_path; }; int mtd_erase(struct mtd_info *mtd, struct erase_info *instr); diff --git a/include/nand.h b/include/nand.h index 1da35d0ce8..fb3b5a1088 100644 --- a/include/nand.h +++ b/include/nand.h @@ -1,4 +1,3 @@ - #ifndef __NAND_H__ #define __NAND_H__ @@ -8,6 +7,7 @@ struct nand_bb; int dev_add_bb_dev(const char *filename, const char *name); int dev_remove_bb_dev(const char *name); struct cdev *mtd_add_bb(struct mtd_info *mtd, const char *name); +void mtd_del_bb(struct mtd_info *mtd); #else static inline int dev_add_bb_dev(const char *filename, const char *name) { return 0; @@ -21,7 +21,10 @@ static inline struct cdev *mtd_add_bb(struct mtd_info *mtd, const char *name) { return NULL; } + +static inline void mtd_del_bb(struct mtd_info *mtd) +{ +} #endif #endif /* __NAND_H__ */ - diff --git a/include/of.h b/include/of.h index 5273f87ebd..2ad941864f 100644 --- a/include/of.h +++ b/include/of.h @@ -623,6 +623,8 @@ static inline struct device_node *of_find_matching_node( for (dn = of_find_node_with_property(NULL, prop_name); dn; \ dn = of_find_node_with_property(dn, prop_name)) +#define for_each_child_of_node_safe(parent, tmp, child) \ + list_for_each_entry_safe(child, tmp, &parent->children, parent_list) #define for_each_child_of_node(parent, child) \ list_for_each_entry(child, &parent->children, parent_list) #define for_each_available_child_of_node(parent, child) \ |