diff options
author | Robin Murphy <robin.murphy@arm.com> | 2019-07-03 18:42:20 +0100 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-10-09 12:30:09 -0500 |
commit | 951d48855d86e72e0d6de73440fe09d363168064 (patch) | |
tree | 209f582eeb8e951035c30c3eca45a102d597bff9 /net/unix | |
parent | 645c138636de3d6d6ed7d92edec39298fd6873d7 (diff) | |
download | linux-951d48855d86e72e0d6de73440fe09d363168064.tar.gz linux-951d48855d86e72e0d6de73440fe09d363168064.tar.bz2 linux-951d48855d86e72e0d6de73440fe09d363168064.zip |
of: Make of_dma_get_range() work on bus nodes
Since the "dma-ranges" property is only valid for a node representing a
bus, of_dma_get_range() currently assumes the node passed in is a leaf
representing a device, and starts the walk from its parent. In cases
like PCI host controllers on typical FDT systems, however, where the PCI
endpoints are probed dynamically the initial leaf node represents the
'bus' itself, and this logic means we fail to consider any "dma-ranges"
describing the host bridge itself. Rework the logic such that
of_dma_get_range() also works correctly starting from a bus node
containing "dma-ranges".
While this does mean "dma-ranges" could incorrectly be in a device leaf
node, there isn't really any way in this function to ensure that a leaf
node is or isn't a bus node.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[robh: Allow for the bus child node to still be passed in]
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Diffstat (limited to 'net/unix')
0 files changed, 0 insertions, 0 deletions