From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Baozi Subject: Re: [PATCH v2 0/3] xen: arm: Parse PCI DT nodes' ranges and interrupt-map Date: Tue, 14 Apr 2015 19:49:17 +0800 Message-ID: <20150414114917.GA25496@cbz-thinkpad> References: <1426180569.32572.72.camel@citrix.com> <1429000987.15516.3.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1429000987.15516.3.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: vijay.kilari@gmail.com, Julien Grall , Tim Deegan , xen-devel , Stefano Stabellini , Suravee Suthikulanit List-Id: xen-devel@lists.xenproject.org On Tue, Apr 14, 2015 at 09:43:07AM +0100, Ian Campbell wrote: > 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 > 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 These 4 patches works for me. Tested-by: Chen Baozi > --- > 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 > > > >