[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 0/3] xen: arm: Parse PCI DT nodes' ranges and interrupt-map
On Thu, 2015-03-12 at 17:16 +0000, Ian Campbell wrote: > This series adds parsing of the DT ranges and interrupt-map properties > for PCI devices, these contain the MMIOs and IRQs used by children on > the bus. This replaces the specific mapping stuff on xgene. Somehow I managed to completely miss sending out the first patch here (thanks Chen Baozi!)... This should be inserted at the head of the series. From d0a024dd49ca6f67b0ec0342fd2d819b750a52a4 Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@xxxxxxxxxx> Date: Fri, 6 Mar 2015 11:13:30 +0000 Subject: [PATCH] xen: dt: add dt_translate_address to translate a raw address A future patch is going to want to translate an address which is not part of the reg property so the existing dt_device_get_address is not suitable. This is the same function as Linux's of_translate_address but with the names changed to fit our context and the dev parameter constified. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/common/device_tree.c | 5 +++++ xen/include/xen/device_tree.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index d1c716f..89491b2 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -682,6 +682,11 @@ bail: return result; } +u64 dt_translate_address(const struct dt_device_node *dev, const __be32 *in_addr) +{ + return __dt_translate_address(dev, in_addr, "ranges"); +} + /* dt_device_address - Translate device tree address and return it */ int dt_device_get_address(const struct dt_device_node *dev, int index, u64 *addr, u64 *size) diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index c8a0375..b7455cd 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -464,6 +464,8 @@ struct dt_device_node *dt_find_node_by_path(const char *path); */ const struct dt_device_node *dt_get_parent(const struct dt_device_node *node); +u64 dt_translate_address(const struct dt_device_node *np, const __be32 *addr); + /** * dt_device_get_address - Resolve an address for a device * @device: the device whose address is to be resolved -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |