summaryrefslogtreecommitdiffstats
path: root/include/of_address.h
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2013-07-02 20:14:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-07-05 08:26:57 +0200
commitbfc5605e2f5961c9a459436a68be864e1f33ab6b (patch)
tree4366e057cc5300e375f53f5196d267287721bd28 /include/of_address.h
parentd0a6aaea6ac113354834b71e1fc19f18eda75088 (diff)
downloadbarebox-bfc5605e2f5961c9a459436a68be864e1f33ab6b.tar.gz
barebox-bfc5605e2f5961c9a459436a68be864e1f33ab6b.tar.xz
OF: convert of_translate_address to new API
This converts existing of_translate_address to recently added API. In contrast to existing behavior, the new function honors ranges properties properly. It now allows reg properties to be set as offset with respect to the correspoding parent node. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of_address.h')
-rw-r--r--include/of_address.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/of_address.h b/include/of_address.h
index a82e2e57b9..9022ab7ca0 100644
--- a/include/of_address.h
+++ b/include/of_address.h
@@ -10,6 +10,8 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
#ifdef CONFIG_OFTREE
+extern u64 of_translate_address(struct device_node *dev,
+ const __be32 *in_addr);
extern u64 of_translate_dma_address(struct device_node *dev,
const __be32 *in_addr);
extern bool of_can_translate_address(struct device_node *dev);
@@ -24,6 +26,12 @@ extern void __iomem *of_iomap(struct device_node *np, int index);
#else /* CONFIG_OFTREE */
+static inline u64 of_translate_address(struct device_node *dev,
+ const __be32 *in_addr)
+{
+ return OF_BAD_ADDR;
+}
+
static inline u64 of_translate_dma_address(struct device_node *dev,
const __be32 *in_addr)
{