summaryrefslogtreecommitdiffstats
path: root/src/dt
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-06-03 16:31:25 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-03 16:31:28 +0200
commit53df62ae2fe30b4fb05124087ec4dcab3312e80c (patch)
treeeda0c4a0ecfa3810b60e10f5ac754259489e74df /src/dt
parent1b60cd5b6303ad13a01769d2713cc75e7ad191c0 (diff)
downloaddt-utils-53df62ae2fe30b4fb05124087ec4dcab3312e80c.tar.gz
dt-utils-53df62ae2fe30b4fb05124087ec4dcab3312e80c.tar.xz
state: describe backend with phandle
We used to describe the backend with a combination of a nodepath and partname:<name>. This is cumbersome and error prone to parse. Instead, describe the backend with a phandle that directly points to the partition. The resulting code is easier to read and the devicetrees are easier to understand. Tested with both mtd and EEPROM device, both with partitions with an offset != 0. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'src/dt')
-rw-r--r--src/dt/dt.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/dt/dt.h b/src/dt/dt.h
index 086edfe..9cbc693 100644
--- a/src/dt/dt.h
+++ b/src/dt/dt.h
@@ -219,8 +219,6 @@ extern int of_platform_populate(struct device_node *root,
struct device_d *parent);
extern struct device_d *of_find_device_by_node(struct device_node *np);
-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_device_is_stdout_path(struct device_d *dev);
const char *of_get_model(void);
void *of_flatten_dtb(struct device_node *node);
@@ -228,15 +226,8 @@ int of_add_memory(struct device_node *node, bool dump);
void of_add_memory_bank(struct device_node *node, bool dump, int r,
uint64_t base, uint64_t size);
-struct of_path {
- char *devpath;
- off_t offset;
- size_t size;
- struct udev_device *dev;
- struct device_node *node;
-};
-
-int of_find_path(struct device_node *node, const char *propname, struct of_path *op);
+int of_get_devicepath(struct device_node *partition_node, char **devnode, off_t *offset,
+ size_t *size);
#define for_each_node_by_name(dn, name) \
for (dn = of_find_node_by_name(NULL, name); dn; \