]> git.ipfire.org Git - people/ms/u-boot.git/commit
fdt: allow fdtdec_get_addr_size_*() to translate addresses
authorStephen Warren <swarren@nvidia.com>
Fri, 5 Aug 2016 15:47:51 +0000 (09:47 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 12 Aug 2016 15:20:27 +0000 (09:20 -0600)
commit6e06acb73248e32457064d8fe820cbc217c45f3f
tree106717d17611a41e530114091fd12693233759bc
parent11e44fc6bda2248271d26a8488f5efe189b55a30
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>
drivers/core/device.c
drivers/gpio/mpc85xx_gpio.c
drivers/i2c/fsl_i2c.c
drivers/mmc/msm_sdhci.c
drivers/net/cpsw.c
drivers/spmi/spmi-msm.c
include/fdtdec.h
lib/fdtdec.c