From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel <xen-devel@lists.xen.org>
Cc: vijay.kilari@gmail.com, Julien Grall <julien.grall@linaro.org>,
Tim Deegan <tim@xen.org>, Chen Baozi <cbz@baozis.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v2 0/3] xen: arm: Parse PCI DT nodes' ranges and interrupt-map
Date: Tue, 14 Apr 2015 09:43:07 +0100 [thread overview]
Message-ID: <1429000987.15516.3.camel@citrix.com> (raw)
In-Reply-To: <1426180569.32572.72.camel@citrix.com>
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@citrix.com>
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@citrix.com>
---
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
next prev parent reply other threads:[~2015-04-14 8:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 17:16 [PATCH v2 0/3] xen: arm: Parse PCI DT nodes' ranges and interrupt-map Ian Campbell
2015-03-12 17:17 ` [PATCH v2 1/3] xen: dt: add dt_for_each_irq_map helper Ian Campbell
2015-03-12 17:17 ` [PATCH v2 2/3] xen: arm: propagate gic's #interrupt-cells property to dom0 Ian Campbell
2015-03-16 16:01 ` Julien Grall
2015-04-17 13:43 ` Ian Campbell
2015-03-12 17:17 ` [PATCH v2 3/3] xen: arm: handle PCI DT node ranges and interrupt-map properties Ian Campbell
2015-03-16 16:14 ` Julien Grall
2015-03-16 16:22 ` Ian Campbell
2015-03-16 16:38 ` Julien Grall
2015-03-16 16:46 ` Ian Campbell
2015-03-16 17:00 ` Julien Grall
2015-04-14 8:43 ` Ian Campbell [this message]
2015-04-14 11:49 ` [PATCH v2 0/3] xen: arm: Parse PCI DT nodes' ranges and interrupt-map Chen Baozi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429000987.15516.3.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=cbz@baozis.org \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tim@xen.org \
--cc=vijay.kilari@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.