OSDN Git Service

of: address: Retrieve a parent through a callback in __of_translate_address
authorMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 1 Apr 2019 08:56:43 +0000 (10:56 +0200)
committerRob Herring <robh@kernel.org>
Wed, 10 Apr 2019 21:33:47 +0000 (16:33 -0500)
commit95835a8d473ee650d5fd13ff223f1cfd568b1bdd
tree0c8060d43c4b168ebfdf29aca7f6f0aca7f0132d
parente5ffa40c0305621a0af512ee11d0e1ef199498e5
of: address: Retrieve a parent through a callback in __of_translate_address

The __of_translate_address function is used to translate the device tree
addresses to physical addresses using the various ranges property to create
the offset.

However, it's shared between the CPU addresses (based on the ranges
property) and the DMA addresses (based on dma-ranges). Since we're going to
add support for a DMA parent node that is not the DT parent node, we need
to change the logic a bit to have a callback function that will retrieve
the parent node we should use.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/address.c