All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Murray <andrew.murray@arm.com>
To: Rob Herring <robherring2@gmail.com>
Cc: "rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"siva.kallam@samsung.com" <siva.kallam@samsung.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Liviu Dudau <Liviu.Dudau@arm.com>,
	"paulus@samba.org" <paulus@samba.org>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"jg1.han@samsung.com" <jg1.han@samsung.com>,
	"jgunthorpe@obsidianresearch.com"
	<jgunthorpe@obsidianresearch.com>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"kgene.kim@samsung.com" <kgene.kim@samsung.com>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"suren.reddy@samsung.com" <suren.reddy@samsung.com>
Subject: Re: [PATCH v5 2/3] of/pci: Provide support for parsing PCI DT ranges property
Date: Thu, 11 Apr 2013 14:11:34 +0100	[thread overview]
Message-ID: <20130411131134.GC28981@arm.com> (raw)
In-Reply-To: <5165AEBA.7000803@gmail.com>

On Wed, Apr 10, 2013 at 07:26:02PM +0100, Rob Herring wrote:
> On 04/10/2013 02:29 AM, Andrew Murray wrote:
> > This patch factors out common implementation patterns to reduce overall kernel
> > code and provide a means for host bridge drivers to directly obtain struct
> > resources from the DT's ranges property without relying on architecture specific
> > DT handling. This will make it easier to write archiecture independent host bridge
> > drivers and mitigate against further duplication of DT parsing code.
> >
> > This patch can be used in the following way:
> >
> >       struct of_pci_range_parser parser;
> >       struct of_pci_range range;
> >
> >       if (of_pci_range_parser(&parser, np))
> >               ; //no ranges property
> >
> >       for_each_of_pci_range(&parser, &range) {
> >
> >               /*
> >                       directly access properties of the address range, e.g.:
> >                       range.pci_space, range.pci_addr, range.cpu_addr,
> >                       range.size, range.flags
> >
> >                       alternatively obtain a struct resource, e.g.:
> >                       struct resource res;
> >                       of_pci_range_to_resource(&range, np, &res);
> >               */
> >       }
> >
> > Additionally the implementation takes care of adjacent ranges and merges them
> > into a single range (as was the case with powerpc and microblaze).
> >
> > Signed-off-by: Andrew Murray <Andrew.Murray@arm.com>
> > Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > ---
> 
> A few minor things below, otherwise:
> 
> Reviewed-by: Rob Herring <rob.herring@calxeda.com>
> 

Thanks for the feedback, I've included this in my next spin.

Andrew Murray

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Murray <andrew.murray-5wv7dgnIgG8@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org"
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	"siva.kallam-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
	<siva.kallam-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
	<jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Liviu Dudau <Liviu.Dudau-5wv7dgnIgG8@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
	<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	"jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org"
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	"kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
	<kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org"
	<paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	"bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org"
	<bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	"suren.reddy-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
	<suren.reddy-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v5 2/3] of/pci: Provide support for parsing PCI DT ranges property
Date: Thu, 11 Apr 2013 14:11:34 +0100	[thread overview]
Message-ID: <20130411131134.GC28981@arm.com> (raw)
In-Reply-To: <5165AEBA.7000803-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Wed, Apr 10, 2013 at 07:26:02PM +0100, Rob Herring wrote:
> On 04/10/2013 02:29 AM, Andrew Murray wrote:
> > This patch factors out common implementation patterns to reduce overall kernel
> > code and provide a means for host bridge drivers to directly obtain struct
> > resources from the DT's ranges property without relying on architecture specific
> > DT handling. This will make it easier to write archiecture independent host bridge
> > drivers and mitigate against further duplication of DT parsing code.
> >
> > This patch can be used in the following way:
> >
> >       struct of_pci_range_parser parser;
> >       struct of_pci_range range;
> >
> >       if (of_pci_range_parser(&parser, np))
> >               ; //no ranges property
> >
> >       for_each_of_pci_range(&parser, &range) {
> >
> >               /*
> >                       directly access properties of the address range, e.g.:
> >                       range.pci_space, range.pci_addr, range.cpu_addr,
> >                       range.size, range.flags
> >
> >                       alternatively obtain a struct resource, e.g.:
> >                       struct resource res;
> >                       of_pci_range_to_resource(&range, np, &res);
> >               */
> >       }
> >
> > Additionally the implementation takes care of adjacent ranges and merges them
> > into a single range (as was the case with powerpc and microblaze).
> >
> > Signed-off-by: Andrew Murray <Andrew.Murray-5wv7dgnIgG8@public.gmane.org>
> > Signed-off-by: Liviu Dudau <Liviu.Dudau-5wv7dgnIgG8@public.gmane.org>
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> > ---
> 
> A few minor things below, otherwise:
> 
> Reviewed-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> 

Thanks for the feedback, I've included this in my next spin.

Andrew Murray

WARNING: multiple messages have this Message-ID (diff)
From: andrew.murray@arm.com (Andrew Murray)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/3] of/pci: Provide support for parsing PCI DT ranges property
Date: Thu, 11 Apr 2013 14:11:34 +0100	[thread overview]
Message-ID: <20130411131134.GC28981@arm.com> (raw)
In-Reply-To: <5165AEBA.7000803@gmail.com>

On Wed, Apr 10, 2013 at 07:26:02PM +0100, Rob Herring wrote:
> On 04/10/2013 02:29 AM, Andrew Murray wrote:
> > This patch factors out common implementation patterns to reduce overall kernel
> > code and provide a means for host bridge drivers to directly obtain struct
> > resources from the DT's ranges property without relying on architecture specific
> > DT handling. This will make it easier to write archiecture independent host bridge
> > drivers and mitigate against further duplication of DT parsing code.
> >
> > This patch can be used in the following way:
> >
> >       struct of_pci_range_parser parser;
> >       struct of_pci_range range;
> >
> >       if (of_pci_range_parser(&parser, np))
> >               ; //no ranges property
> >
> >       for_each_of_pci_range(&parser, &range) {
> >
> >               /*
> >                       directly access properties of the address range, e.g.:
> >                       range.pci_space, range.pci_addr, range.cpu_addr,
> >                       range.size, range.flags
> >
> >                       alternatively obtain a struct resource, e.g.:
> >                       struct resource res;
> >                       of_pci_range_to_resource(&range, np, &res);
> >               */
> >       }
> >
> > Additionally the implementation takes care of adjacent ranges and merges them
> > into a single range (as was the case with powerpc and microblaze).
> >
> > Signed-off-by: Andrew Murray <Andrew.Murray@arm.com>
> > Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > ---
> 
> A few minor things below, otherwise:
> 
> Reviewed-by: Rob Herring <rob.herring@calxeda.com>
> 

Thanks for the feedback, I've included this in my next spin.

Andrew Murray

  reply	other threads:[~2013-04-11 13:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10  7:29 [PATCH v5 0/3] of/pci: Provide common support for PCI DT parsing Andrew Murray
2013-04-10  7:29 ` Andrew Murray
2013-04-10  7:29 ` Andrew Murray
2013-04-10  7:29 ` [PATCH v5 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC Andrew Murray
2013-04-10  7:29   ` Andrew Murray
2013-04-10  7:29   ` Andrew Murray
2013-04-10 13:13   ` Rob Herring
2013-04-10 13:13     ` Rob Herring
2013-04-10 21:30     ` Thomas Petazzoni
2013-04-10 21:30       ` Thomas Petazzoni
2013-04-11 16:57       ` Linus Walleij
2013-04-11 16:57         ` Linus Walleij
2013-04-11 16:57         ` Linus Walleij
2013-04-11 12:03     ` Andrew Murray
2013-04-11 12:03       ` Andrew Murray
2013-04-11 12:03       ` Andrew Murray
2013-04-10 21:33   ` Thomas Petazzoni
2013-04-10 21:33     ` Thomas Petazzoni
2013-04-11 12:12     ` Andrew Murray
2013-04-11 12:12       ` Andrew Murray
     [not found]       ` <20130411121242.GB28981-5wv7dgnIgG8@public.gmane.org>
2013-04-11 15:28         ` Thomas Petazzoni
2013-04-11 15:28           ` Thomas Petazzoni
2013-04-10  7:29 ` [PATCH v5 2/3] of/pci: Provide support for parsing PCI DT ranges property Andrew Murray
2013-04-10  7:29   ` Andrew Murray
2013-04-10  7:29   ` Andrew Murray
2013-04-10 18:26   ` Rob Herring
2013-04-10 18:26     ` Rob Herring
2013-04-10 18:26     ` Rob Herring
2013-04-11 13:11     ` Andrew Murray [this message]
2013-04-11 13:11       ` Andrew Murray
2013-04-11 13:11       ` Andrew Murray
2013-04-10  7:29 ` [PATCH v5 3/3] of/pci: mips: convert to common of_pci_range_parser Andrew Murray
2013-04-10  7:29   ` Andrew Murray
2013-04-10  7:29   ` Andrew Murray
2013-04-10 18:28   ` Rob Herring
2013-04-10 18:28     ` Rob Herring

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=20130411131134.GC28981@arm.com \
    --to=andrew.murray@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=jg1.han@samsung.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=paulus@samba.org \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.com \
    --cc=siva.kallam@samsung.com \
    --cc=suren.reddy@samsung.com \
    /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.