]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/of/base.c
of: Factor out #{addr,size}-cells parsing
authorRobin Murphy <robin.murphy@arm.com>
Tue, 2 Jul 2019 17:42:39 +0000 (18:42 +0100)
committerRob Herring <robh@kernel.org>
Tue, 8 Oct 2019 18:50:22 +0000 (13:50 -0500)
commitb68ac8dc22ebbf003e26e44bf4dd3030c076df5a
treed26b5be8ad883c6ca06698aa186bd11523df94ae
parentc60bf3eb888a362100aa1bdbea351dab681e262a
of: Factor out #{addr,size}-cells parsing

In some cases such as PCI host controllers, we may have a "parent bus"
which is an OF leaf node, but still need to correctly parse ranges from
the point of view of that bus. For that, factor out variants of the
"#addr-cells" and "#size-cells" parsers which do not assume they have a
device node and thus immediately traverse upwards before reading the
relevant property.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[robh: don't make of_bus_n_{addr,size}_cells() public]
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/address.c
drivers/of/base.c
drivers/of/of_private.h