Devicetree for 4.7:
- Rewrite of the unflattening code to avoid recursion and lessen the stack usage. - Rewrite of the phandle args parsing code to get rid of the fixed args size. This is needed for IOMMU code. - Sync to latest dtc which adds more dts style checking. These warnings are enabled with "W=1" compiles. - Tegra documentation updates related to the above warnings. - A bunch of spelling and other doc fixes. - Various vendor prefix additions. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXP3OZAAoJEPr7XbWNvGHDEUAQAJLbR9Js7RENPGX/u0NSJNaJ yQhyNVsz/BkAWFfWT6YEfyNnDY0UcRs2N9RHb+z65TsX1jvJJxLRDLRfz+rExfiZ cA1RJaF77kPOdA0eZapJIzPvAf97Zik+nzKLsqUPUSYaIzghV5rN6aR2AjXN5AYv TMQP41NwNQkxfO5I+NOssEB8IBH+DlAzg0LYXw8wNsAJc8o+DgEQjU8cxCqR0NgE SbpbJNF8tRXEJckZRC+Q7Gyn2J7VglmM/5VTFbBBwgIly2lcLADPVuX/Z6hZE3OH K7mhNWBu61vI5lU6u7q64ePeb63j+Ut/RR0tTPgjsLg0Qg0ue+6iZ66S9ZHEicbU wT4A/hjSImvZoQGGMrtUF5HGcaoMHGLGFgFc/Ouox8OQflntQBzuEx/gOQpPXcIT vdwITNW8/OGV3rgtmRO9mbdSZiAHPsydoTkIl+Ucod3nTrlEEOwgQARYO+2CfSRj sknndj26Kf+0n0tSv2d4JAEdEozp2ZPyfiAfpPXW74jOmOxeswUb3Kxx8YMwhCEl +s96rm1vtpNmJzXtuPV3eB0TydWMQ/3NXN6XOS7qEN/5y1AbQqKEoIyJOziBQMxe c9Eh/YSjsm4uw3Q0wHOI3s4hTwWfuBmwpIsANJVKrRbftPF58bMUBYU/44ReTtA8 iMsrqJpnSCcAyS8doWRY =s+gW -----END PGP SIGNATURE----- Merge tag 'devicetree-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Rewrite of the unflattening code to avoid recursion and lessen the stack usage. - Rewrite of the phandle args parsing code to get rid of the fixed args size. This is needed for IOMMU code. - Sync to latest dtc which adds more dts style checking. These warnings are enabled with "W=1" compiles. - Tegra documentation updates related to the above warnings. - A bunch of spelling and other doc fixes. - Various vendor prefix additions. * tag 'devicetree-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (52 commits) devicetree: Add Creative Technology vendor id gpio: dt-bindings: add ibm,ppc4xx-gpio binding of/unittest: Remove unnecessary module.h header inclusion drivers/of: Fix build warning in populate_node() drivers/of: Fix depth when unflattening devicetree of: dynamic: changeset prop-update revert fix drivers/of: Export of_detach_node() drivers/of: Return allocated memory from of_fdt_unflatten_tree() drivers/of: Specify parent node in of_fdt_unflatten_tree() drivers/of: Rename unflatten_dt_node() drivers/of: Avoid recursively calling unflatten_dt_node() drivers/of: Split unflatten_dt_node() of: include errno.h in of_graph.h of: document refcount incrementation of of_get_cpu_node() Documentation: dt: soc: fix spelling mistakes Documentation: dt: power: fix spelling mistake Documentation: dt: pinctrl: fix spelling mistake Documentation: dt: opp: fix spelling mistake Documentation: dt: net: fix spelling mistakes Documentation: dt: mtd: fix spelling mistake ...
This commit is contained in:
commit
e7f44b65b5
56 changed files with 603 additions and 298 deletions
|
@ -75,6 +75,23 @@ struct of_phandle_args {
|
|||
uint32_t args[MAX_PHANDLE_ARGS];
|
||||
};
|
||||
|
||||
struct of_phandle_iterator {
|
||||
/* Common iterator information */
|
||||
const char *cells_name;
|
||||
int cell_count;
|
||||
const struct device_node *parent;
|
||||
|
||||
/* List size information */
|
||||
const __be32 *list_end;
|
||||
const __be32 *phandle_end;
|
||||
|
||||
/* Current position state */
|
||||
const __be32 *cur;
|
||||
uint32_t cur_count;
|
||||
phandle phandle;
|
||||
struct device_node *node;
|
||||
};
|
||||
|
||||
struct of_reconfig_data {
|
||||
struct device_node *dn;
|
||||
struct property *prop;
|
||||
|
@ -334,6 +351,18 @@ extern int of_parse_phandle_with_fixed_args(const struct device_node *np,
|
|||
extern int of_count_phandle_with_args(const struct device_node *np,
|
||||
const char *list_name, const char *cells_name);
|
||||
|
||||
/* phandle iterator functions */
|
||||
extern int of_phandle_iterator_init(struct of_phandle_iterator *it,
|
||||
const struct device_node *np,
|
||||
const char *list_name,
|
||||
const char *cells_name,
|
||||
int cell_count);
|
||||
|
||||
extern int of_phandle_iterator_next(struct of_phandle_iterator *it);
|
||||
extern int of_phandle_iterator_args(struct of_phandle_iterator *it,
|
||||
uint32_t *args,
|
||||
int size);
|
||||
|
||||
extern void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align));
|
||||
extern int of_alias_get_id(struct device_node *np, const char *stem);
|
||||
extern int of_alias_get_highest_id(const char *stem);
|
||||
|
@ -608,6 +637,27 @@ static inline int of_count_phandle_with_args(struct device_node *np,
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int of_phandle_iterator_init(struct of_phandle_iterator *it,
|
||||
const struct device_node *np,
|
||||
const char *list_name,
|
||||
const char *cells_name,
|
||||
int cell_count)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int of_phandle_iterator_next(struct of_phandle_iterator *it)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int of_phandle_iterator_args(struct of_phandle_iterator *it,
|
||||
uint32_t *args,
|
||||
int size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int of_alias_get_id(struct device_node *np, const char *stem)
|
||||
{
|
||||
return -ENOSYS;
|
||||
|
@ -877,6 +927,12 @@ static inline int of_property_read_s32(const struct device_node *np,
|
|||
return of_property_read_u32(np, propname, (u32*) out_value);
|
||||
}
|
||||
|
||||
#define of_for_each_phandle(it, err, np, ln, cn, cc) \
|
||||
for (of_phandle_iterator_init((it), (np), (ln), (cn), (cc)), \
|
||||
err = of_phandle_iterator_next(it); \
|
||||
err == 0; \
|
||||
err = of_phandle_iterator_next(it))
|
||||
|
||||
#define of_property_for_each_u32(np, propname, prop, p, u) \
|
||||
for (prop = of_find_property(np, propname, NULL), \
|
||||
p = of_prop_next_u32(prop, NULL, &u); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue