linux/of.h: Add of_n_size_cells()

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

View File

@ -61,6 +61,8 @@ const void *of_get_property(const struct device_node *dn, const char *name,
int of_n_addr_cells(struct device_node *dn);
int of_n_size_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

@ -211,6 +211,13 @@ of_n_addr_cells(struct device_node *dn)
return (get_address_cells(bsp_fdt_get(), dn->offset));
}
int
of_n_size_cells(struct device_node *dn)
{
return (get_size_cells(bsp_fdt_get(), dn->offset));
}
int
of_address_to_resource(struct device_node *dn, int index,
struct resource *res)