of: Add cpu node iterator for_each_of_cpu_node()

Iterating thru cpu nodes is a common pattern. Create a common iterator
which can find child nodes either by node name or device_type == cpu.
Using the former will allow for eventually dropping device_type
properties which are deprecated for FDT.

Cc: Frank Rowand <frowand.list@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Rob Herring 2018-08-22 15:04:40 -05:00
commit f1f207e43b
2 changed files with 50 additions and 0 deletions