linux/of.h: Add of_n_addr_cells()

Update #3277.
This commit is contained in:
Sebastian Huber 2018-01-17 14:13:34 +01:00
parent 066b536397
commit 0d421d850e
2 changed files with 9 additions and 0 deletions

View File

@ -59,6 +59,8 @@ of_node_put(struct device_node *dn)
const void *of_get_property(const struct device_node *dn, const char *name,
int *len);
int of_n_addr_cells(struct device_node *dn);
/* FIXME: If we need the property, then more work is to do */
#define of_find_property(dn, name, len) of_get_property(dn, name, len)

View File

@ -204,6 +204,13 @@ get_size_cells(const void *fdt, int node)
return (get_cells(fdt, node, "#size-cells"));
}
int
of_n_addr_cells(struct device_node *dn)
{
return (get_address_cells(bsp_fdt_get(), dn->offset));
}
int
of_address_to_resource(struct device_node *dn, int index,
struct resource *res)