summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-04-07 09:59:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-04-07 09:59:38 +0200
commit53adf0648c330357103e4a7103c3d7f05c0c4bcf (patch)
tree78d038c2761e3c0694eac9bc3386436a8d6c3b1c /include
parent8b30a8a77612b728bf664a9e9827af7ebdbcd3ba (diff)
parent12960a57841d5e6ea04fd523611e15a9a4170c89 (diff)
downloadbarebox-53adf0648c330357103e4a7103c3d7f05c0c4bcf.tar.gz
barebox-53adf0648c330357103e4a7103c3d7f05c0c4bcf.tar.xz
Merge branch 'for-next/ofpart'
Diffstat (limited to 'include')
-rw-r--r--include/driver.h4
-rw-r--r--include/linux/mtd/mtd.h1
-rw-r--r--include/of.h15
3 files changed, 19 insertions, 1 deletions
diff --git a/include/driver.h b/include/driver.h
index 6abaaad8b4..52e06f7d62 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -459,6 +459,8 @@ struct cdev {
u8 dos_partition_type;
struct cdev *link;
struct list_head link_entry, links;
+ struct list_head partition_entry, partitions;
+ struct cdev *master;
};
int devfs_create(struct cdev *);
@@ -481,8 +483,8 @@ int cdev_erase(struct cdev *cdev, loff_t count, loff_t offset);
#define DEVFS_PARTITION_FIXED (1U << 0)
#define DEVFS_PARTITION_READONLY (1U << 1)
-#define DEVFS_IS_PARTITION (1 << 2)
#define DEVFS_IS_CHARACTER_DEV (1 << 3)
+#define DEVFS_PARTITION_FROM_TABLE (1 << 4)
struct cdev *devfs_add_partition(const char *devname, loff_t offset,
loff_t size, unsigned int flags, const char *name);
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index f93fac00f2..fa35c7ef39 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -228,6 +228,7 @@ struct mtd_info {
struct list_head partitions_entry;
char *of_path;
+ unsigned int of_binding;
};
int mtd_erase(struct mtd_info *mtd, struct erase_info *instr);
diff --git a/include/of.h b/include/of.h
index e3bb452b86..0ba73f197f 100644
--- a/include/of.h
+++ b/include/of.h
@@ -205,6 +205,8 @@ extern int of_property_write_u32_array(struct device_node *np,
extern int of_property_write_u64_array(struct device_node *np,
const char *propname, const u64 *values,
size_t sz);
+extern int of_property_write_string(struct device_node *np, const char *propname,
+ const char *value);
extern struct device_node *of_parse_phandle(const struct device_node *np,
const char *phandle_name,
@@ -238,6 +240,7 @@ extern struct device_d *of_device_enable_and_register_by_name(const char *name);
struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node);
int of_parse_partitions(struct cdev *cdev, struct device_node *node);
+int of_partitions_register_fixup(struct cdev *cdev);
int of_device_is_stdout_path(struct device_d *dev);
const char *of_get_model(void);
void *of_flatten_dtb(struct device_node *node);
@@ -248,6 +251,7 @@ struct device_d *of_find_device_by_node_path(const char *path);
#define OF_FIND_PATH_FLAGS_BB 1 /* return .bb device if available */
int of_find_path(struct device_node *node, const char *propname, char **outpath, unsigned flags);
int of_find_path_by_node(struct device_node *node, char **outpath, unsigned flags);
+struct device_node *of_find_node_by_devpath(struct device_node *root, const char *path);
int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context);
int of_unregister_fixup(int (*fixup)(struct device_node *, void *), void *context);
int of_register_set_status_fixup(const char *node, bool status);
@@ -262,6 +266,11 @@ static inline int of_parse_partitions(struct cdev *cdev,
return -EINVAL;
}
+static inline int of_partitions_register_fixup(struct cdev *cdev)
+{
+ return -ENOSYS;
+}
+
static inline int of_device_is_stdout_path(struct device_d *dev)
{
return 0;
@@ -466,6 +475,12 @@ static inline int of_property_write_u64_array(struct device_node *np,
return -ENOSYS;
}
+static inline int of_property_write_string(struct device_node *np, const char *propname,
+ const char *value)
+{
+ return -ENOSYS;
+}
+
static inline struct device_node *of_parse_phandle(const struct device_node *np,
const char *phandle_name, int index)
{