summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2016-08-05 09:47:51 -0600
committerSimon Glass <sjg@chromium.org>2016-08-12 09:20:27 -0600
commit6e06acb73248e32457064d8fe820cbc217c45f3f (patch)
tree106717d17611a41e530114091fd12693233759bc /drivers/net
parent11e44fc6bda2248271d26a8488f5efe189b55a30 (diff)
downloadu-boot-imx-6e06acb73248e32457064d8fe820cbc217c45f3f.zip
u-boot-imx-6e06acb73248e32457064d8fe820cbc217c45f3f.tar.gz
u-boot-imx-6e06acb73248e32457064d8fe820cbc217c45f3f.tar.bz2
fdt: allow fdtdec_get_addr_size_*() to translate addresses
Some code may want to read reg values from DT, but from nodes that aren't associated with DM devices, so using dev_get_addr_index() isn't appropriate. In this case, fdtdec_get_addr_size_*() are the functions to use. However, "translation" (via the chain of ranges properties in parent nodes) may still be desirable. Add a function parameter to request that, and implement it. Update all call sites to default to the original behaviour. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Squashed in build fix from Stephen: Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/cpsw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 774b021..8a2f88a 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -1146,7 +1146,8 @@ static const struct eth_ops cpsw_eth_ops = {
static inline fdt_addr_t cpsw_get_addr_by_node(const void *fdt, int node)
{
- return fdtdec_get_addr_size_auto_noparent(fdt, node, "reg", 0, NULL);
+ return fdtdec_get_addr_size_auto_noparent(fdt, node, "reg", 0, NULL,
+ false);
}
static int cpsw_eth_ofdata_to_platdata(struct udevice *dev)